home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-01-26 | 95.5 KB | 3,199 lines |
- diff -urN xntp3-5.93d/ChangeLog xntp3-5.93e/ChangeLog
- --- xntp3-5.93d/ChangeLog Tue Jun 23 22:10:25 1998
- +++ xntp3-5.93e/ChangeLog Mon Aug 10 18:21:30 1998
- @@ -1,3 +1,20 @@
- +Mon Aug 10 18:18:40 1998 Harlan Stenn <stenn@whimsy.udel.edu>
- +
- + * configure.in: 5.93e
- +
- + - Use the latest version of the mdX routines if __NetBSD__
- + - Add missing prototypes
- + - Don't compare against EOF in ntp_getopt; the getopt functions
- + are defined to return -1.
- + - NetBSD is broken with respect to clock_settime in that it does not
- + define CLOCK_REALTIME yet. Check for that.
- + - Make functions in the function lists have consistant signatures and
- + widen prototypes where necessary.
- + - Fix a printf argument.
- + - make main declarations consistant; use int main instead of void
- + always, and add prototypes for the appropriate main function.
- + From: Christos Zoulas <christos@zoulas.com>
- +
- Tue Jun 23 22:09:07 1998 Harlan Stenn <stenn@whimsy.udel.edu>
-
- * configure.in: 5.93d
- diff -urN xntp3-5.93d/configure xntp3-5.93e/configure
- --- xntp3-5.93d/configure Tue Jun 23 22:11:22 1998
- +++ xntp3-5.93e/configure Mon Aug 10 18:21:48 1998
- @@ -787,7 +787,7 @@
-
- PACKAGE=xntp3
-
- -VERSION=5.93d
- +VERSION=5.93e
-
- if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
- diff -urN xntp3-5.93d/configure.in xntp3-5.93e/configure.in
- --- xntp3-5.93d/configure.in Tue Jun 23 22:10:29 1998
- +++ xntp3-5.93e/configure.in Mon Aug 10 18:21:32 1998
- @@ -1,7 +1,7 @@
- dnl -*-fundamental-*-
- dnl Process this file with autoconf to produce a configure script.
- AC_INIT(xntpd/ntp_refclock.c)
- -AM_INIT_AUTOMAKE(xntp3, 5.93d)
- +AM_INIT_AUTOMAKE(xntp3, 5.93e)
- AC_CANONICAL_SYSTEM
- AC_DEFINE_UNQUOTED(STR_SYSTEM, "$target")
- AM_CONFIG_HEADER(config.h)
- diff -urN xntp3-5.93d/include/parse.h xntp3-5.93e/include/parse.h
- --- xntp3-5.93d/include/parse.h Mon Dec 9 20:49:14 1996
- +++ xntp3-5.93e/include/parse.h Mon Aug 10 18:14:45 1998
- @@ -335,11 +335,16 @@
-
- struct clockformat
- {
- - u_long (*input)(); /* special input protocol - implies fixed format */
- - u_long (*convert)(); /* conversion routine */
- - void (*syncevt)(); /* routine for handling RS232 sync events (time stamps) */
- - u_long (*syncpps)(); /* PPS input routine */
- - u_long (*synth)(); /* time code synthesizer */
- + u_long (*input) /* special input protocol - implies fixed format */
- + P((parse_t *, unsigned int, timestamp_t *));
- + u_long (*convert) /* conversion routine */
- + P((char *, unsigned int, void *, clocktime_t *, void *));
- + void (*syncevt) /* routine for handling RS232 sync events (time stamps) */
- + P((parse_t *, timestamp_t *, void *, u_long));
- + u_long (*syncpps) /* PPS input routine */
- + P((parse_t *, int, timestamp_t *));
- + u_long (*synth) /* time code synthesizer */
- + P((parse_t *, timestamp_t *));
- void *data; /* local parameters */
- char *name; /* clock format name */
- unsigned short length; /* maximum length of data packet */
- @@ -371,7 +376,7 @@
-
- extern time_t parse_to_unixtime P((clocktime_t *, u_long *));
- extern u_long updatetimeinfo P((parse_t *, time_t, u_long, u_long));
- -extern void syn_simple P((parse_t *, timestamp_t *, struct format *, u_long));
- +extern void syn_simple P((parse_t *, timestamp_t *, void *, u_long));
- extern u_long pps_simple P((parse_t *, int, timestamp_t *));
- #endif
-
- diff -urN xntp3-5.93d/libntp/a_md512crypt.c xntp3-5.93e/libntp/a_md512crypt.c
- --- xntp3-5.93d/libntp/a_md512crypt.c Tue Jul 15 00:31:53 1997
- +++ xntp3-5.93e/libntp/a_md512crypt.c Mon Aug 10 18:14:33 1998
- @@ -74,6 +74,9 @@
- u_int32 *pkt;
- int length; /* total length of encrypted area */
- {
- +#ifdef __NetBSD__
- + unsigned char hash[16];
- +#endif
- /*
- * Don't bother checking the keys. The first stage would have
- * handled that. Finish up the generation by also including the
- @@ -81,10 +84,18 @@
- */
-
- MD5Update(&ctx, (unsigned const char *)(pkt) + length - 8, 8);
- +#ifdef __NetBSD__
- + MD5Final(hash, &ctx);
- +#else
- MD5Final(&ctx);
- +#endif
-
- memmove((char *) &pkt[NOCRYPT_int32S + length/sizeof(u_int32)],
- - (char *) ctx.digest,
- +#ifdef __NetBSD__
- + (char *) hash,
- +#else
- + (char *) ctx.digest,
- +#endif
- BLOCK_OCTETS);
- return (4 + BLOCK_OCTETS);
- }
- diff -urN xntp3-5.93d/libntp/a_md5decrypt.c xntp3-5.93e/libntp/a_md5decrypt.c
- --- xntp3-5.93d/libntp/a_md5decrypt.c Mon Aug 11 01:21:51 1997
- +++ xntp3-5.93e/libntp/a_md5decrypt.c Mon Aug 10 18:14:33 1998
- @@ -39,6 +39,9 @@
- int length; /* length of variable data in octets */
- {
- MD5_CTX ctx;
- +#ifdef __NetBSD__
- + unsigned char hash[16];
- +#endif
-
- authdecryptions++;
-
- @@ -51,9 +54,18 @@
- MD5Init(&ctx);
- MD5Update(&ctx, (unsigned const char *)cache_key, cache_keylen);
- MD5Update(&ctx, (unsigned const char *)pkt, length);
- +#ifdef __NetBSD__
- + MD5Final(hash, &ctx);
- +#else
- MD5Final(&ctx);
- +#endif
-
- - return (!memcmp((const char *)ctx.digest,
- + return (!memcmp(
- +#ifdef __NetBSD__
- + (const char *) hash,
- +#else
- + (const char *) ctx.digest,
- +#endif
- (const char *)pkt + length + 4,
- BLOCK_OCTETS));
- }
- diff -urN xntp3-5.93d/libntp/a_md5encrypt.c xntp3-5.93e/libntp/a_md5encrypt.c
- --- xntp3-5.93d/libntp/a_md5encrypt.c Tue Jul 15 00:32:20 1997
- +++ xntp3-5.93e/libntp/a_md5encrypt.c Mon Aug 10 18:14:33 1998
- @@ -45,6 +45,9 @@
- {
- MD5_CTX ctx;
- int len; /* in 4 byte quantities */
- +#ifdef __NetBSD__
- + unsigned char hash[16];
- +#endif
-
- authencryptions++;
-
- @@ -64,10 +67,18 @@
- MD5Init(&ctx);
- MD5Update(&ctx, (unsigned const char *)cache_key, cache_keylen);
- MD5Update(&ctx, (unsigned const char *)pkt, length);
- +#ifdef __NetBSD__
- + MD5Final(hash, &ctx);
- +#else
- MD5Final(&ctx);
- +#endif
-
- memmove((char *)&pkt[NOCRYPT_int32S + len],
- - (char *)ctx.digest,
- +#ifdef __NetBSD__
- + (char *) hash,
- +#else
- + (char *) ctx.digest,
- +#endif
- BLOCK_OCTETS);
- return (4 + BLOCK_OCTETS); /* return size of key and MAC */
- }
- diff -urN xntp3-5.93d/libntp/getopt.c xntp3-5.93e/libntp/getopt.c
- --- xntp3-5.93d/libntp/getopt.c Thu Mar 5 22:00:37 1998
- +++ xntp3-5.93e/libntp/getopt.c Mon Aug 10 18:14:33 1998
- @@ -30,6 +30,8 @@
- static char *scan = NULL; /* Private scan pointer. */
- static const char *prog = "amnesia";
-
- +static int badopt P((char *, int));
- +
- /*
- * Print message about a bad option.
- */
- diff -urN xntp3-5.93d/libntp/humandate.c xntp3-5.93e/libntp/humandate.c
- --- xntp3-5.93d/libntp/humandate.c Mon Aug 11 01:07:20 1997
- +++ xntp3-5.93e/libntp/humandate.c Mon Aug 10 18:14:33 1998
- @@ -20,6 +20,8 @@
- "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
- };
-
- +char *humanlogtime P((void));
- +
- char *
- humandate(ntptime)
- u_long ntptime;
- diff -urN xntp3-5.93d/libntp/lib_strbuf.h xntp3-5.93e/libntp/lib_strbuf.h
- --- xntp3-5.93d/libntp/lib_strbuf.h Sat Aug 3 23:34:01 1996
- +++ xntp3-5.93e/libntp/lib_strbuf.h Mon Aug 10 18:14:33 1998
- @@ -25,3 +25,5 @@
- extern char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
- extern int lib_nextbuf;
- extern int lib_inited;
- +
- +void init_lib P((void));
- diff -urN xntp3-5.93d/libntp/machines.c xntp3-5.93e/libntp/machines.c
- --- xntp3-5.93d/libntp/machines.c Wed Apr 29 22:09:50 1998
- +++ xntp3-5.93e/libntp/machines.c Mon Aug 10 18:14:33 1998
- @@ -112,7 +112,7 @@
- }
- #endif /* SYS_PTX */
-
- -#ifdef HAVE_CLOCK_SETTIME
- +#if defined(HAVE_CLOCK_SETTIME) && defined(CLOCK_REALTIME)
- const char *set_tod_using = "clock_settime";
-
- /*#include <time.h> */
- @@ -131,7 +131,7 @@
- return clock_settime(CLOCK_REALTIME, &ts);
- }
-
- -#else /* not HAVE_CLOCK_SETTIME */
- +#else /* not HAVE_CLOCK_SETTIME || not CLOCK_REALTIME */
- # ifdef HAVE_SETTIMEOFDAY
- const char *set_tod_using = "settimeofday";
- # else /* not (HAVE_SETTIMEOFDAY || HAVE_CLOCK_SETTIME) */
- diff -urN xntp3-5.93d/libparse/clk_computime.c xntp3-5.93e/libparse/clk_computime.c
- --- xntp3-5.93d/libparse/clk_computime.c Mon Jan 20 22:02:04 1997
- +++ xntp3-5.93e/libparse/clk_computime.c Mon Aug 10 18:17:34 1998
- @@ -63,15 +63,15 @@
- 0
- };
-
- -static u_long cvt_computime();
- +static u_long cvt_computime P((char *, unsigned int, void *, clocktime_t *, void *));
-
- clockformat_t clock_computime =
- {
- - (unsigned long (*) ()) 0, /* no input handling */
- + NULL, /* no input handling */
- cvt_computime, /* Computime conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- - (u_long (*)())0, /* no PPS monitoring */
- - (u_long(*) ())0, /* no time code synthesizer monitoring */
- + NULL, /* no PPS monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&computime_fmt, /* conversion configuration */
- "Diem's Computime Radio Clock", /* Computime Radio Clock */
- 24, /* string buffer */
- @@ -89,12 +89,14 @@
- * convert simple type format
- */
- static u_long
- -cvt_computime(buffer, size, format, clock)
- +cvt_computime(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register struct format *format = vf;
-
- if (!Strok(buffer, format->fixed_string)) {
- return CVT_NONE;
- diff -urN xntp3-5.93d/libparse/clk_dcf7000.c xntp3-5.93e/libparse/clk_dcf7000.c
- --- xntp3-5.93d/libparse/clk_dcf7000.c Mon Jan 20 22:02:05 1997
- +++ xntp3-5.93e/libparse/clk_dcf7000.c Mon Aug 10 18:17:34 1998
- @@ -40,15 +40,15 @@
- 0
- };
-
- -static u_long cvt_dcf7000();
- +static u_long cvt_dcf7000 P((char *, unsigned int, void *, clocktime_t *, void *));
-
- clockformat_t clock_dcf7000 =
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_dcf7000, /* ELV DCF77 conversion */
- syn_simple, /* easy time stamps */
- - (u_long (*)())0, /* no direct PPS monitoring */
- - (u_long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* no direct PPS monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&dcf7000_fmt, /* conversion configuration */
- "ELV DCF7000", /* ELV clock */
- 24, /* string buffer */
- @@ -66,12 +66,14 @@
- * convert dcf7000 type format
- */
- static u_long
- -cvt_dcf7000(buffer, size, format, clock)
- +cvt_dcf7000(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register struct format *format = vf;
- if (!Strok(buffer, format->fixed_string))
- {
- return CVT_NONE;
- diff -urN xntp3-5.93d/libparse/clk_hopf6021.c xntp3-5.93e/libparse/clk_hopf6021.c
- --- xntp3-5.93d/libparse/clk_hopf6021.c Wed May 7 22:20:25 1997
- +++ xntp3-5.93e/libparse/clk_hopf6021.c Mon Aug 10 18:17:34 1998
- @@ -113,15 +113,16 @@
- ('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
- -1)
-
- -static unsigned long cvt_hopf6021();
-
- +static u_long cvt_hopf6021 P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- clockformat_t clock_hopf6021 =
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_hopf6021, /* Radiocode clock conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- - (unsigned long (*)())0, /* no direct PPS monitoring */
- - (unsigned long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* no direct PPS monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&hopf6021_fmt, /* conversion configuration */
- "hopf Funkuhr 6021", /* clock format name */
- 19, /* string buffer */
- @@ -133,14 +134,16 @@
- 0 /* sync symbol */
- };
-
- -static unsigned long
- -cvt_hopf6021(buffer, size, format, clock)
- +static u_long
- +cvt_hopf6021(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- - char status,weekday;
- + register struct format *format = vf;
- + int status,weekday;
-
- if (!Strok(buffer, format->fixed_string))
- {
- diff -urN xntp3-5.93d/libparse/clk_meinberg.c xntp3-5.93e/libparse/clk_meinberg.c
- --- xntp3-5.93d/libparse/clk_meinberg.c Mon Jan 20 22:02:05 1997
- +++ xntp3-5.93e/libparse/clk_meinberg.c Mon Aug 10 18:17:35 1998
- @@ -142,17 +142,18 @@
- }
- };
-
- -static u_long cvt_meinberg();
- -static u_long cvt_mgps();
-
- +static u_long cvt_meinberg P((char *, unsigned int, void *, clocktime_t *, void *));
- +static u_long cvt_mgps P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- clockformat_t clock_meinberg[] =
- {
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_meinberg, /* Meinberg conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- pps_simple, /* easy PPS monitoring */
- - (u_long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&meinberg_fmt[0], /* conversion configuration */
- "Meinberg Standard", /* Meinberg simple format - beware */
- 32, /* string buffer */
- @@ -164,11 +165,11 @@
- '\0'
- },
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_meinberg, /* Meinberg conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- pps_simple, /* easy PPS monitoring */
- - (u_long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&meinberg_fmt[1], /* conversion configuration */
- "Meinberg Extended", /* Meinberg enhanced format */
- 32, /* string buffer */
- @@ -180,11 +181,11 @@
- '\0'
- },
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_mgps, /* Meinberg GPS166 conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- pps_simple, /* easy PPS monitoring */
- - (u_long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&meinberg_fmt[2], /* conversion configuration */
- "Meinberg GPS Extended", /* Meinberg FAU GPS format */
- 70, /* string buffer */
- @@ -203,12 +204,14 @@
- * convert simple type format
- */
- static u_long
- -cvt_meinberg(buffer, size, format, clock)
- +cvt_meinberg(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register struct format *format = vf;
- if (!Strok(buffer, format->fixed_string))
- {
- return CVT_NONE;
- @@ -332,12 +335,14 @@
- * convert Meinberg GPS format
- */
- static u_long
- -cvt_mgps(buffer, size, format, clock)
- +cvt_mgps(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register struct format *format = vf;
- if (!Strok(buffer, format->fixed_string))
- {
- return CVT_NONE;
- diff -urN xntp3-5.93d/libparse/clk_rawdcf.c xntp3-5.93e/libparse/clk_rawdcf.c
- --- xntp3-5.93d/libparse/clk_rawdcf.c Mon Jan 20 22:02:05 1997
- +++ xntp3-5.93e/libparse/clk_rawdcf.c Mon Aug 10 18:17:35 1998
- @@ -84,15 +84,20 @@
- * 59 - usually missing (minute indication), except for leap insertion
- */
-
- -static u_long cvt_rawdcf();
- -static u_long pps_rawdcf();
- -static u_long snt_rawdcf();
- +/* clk_rawdcf.c */
- +static u_long ext_bf P((char *, int, char *));
- +static unsigned pcheck P((char *, int, char *));
- +struct dcfparam;
- +static u_long convert_rawdcf P((unsigned char *, int, struct dcfparam *, clocktime_t *));
- +static u_long cvt_rawdcf P((char *, unsigned int, void *, clocktime_t *, void *));
- +static u_long pps_rawdcf P((parse_t *, int, timestamp_t *));
- +static u_long snt_rawdcf P((parse_t *, timestamp_t *));
-
- clockformat_t clock_rawdcf =
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_rawdcf, /* raw dcf input conversion */
- - (void (*)())0, /* no character bound synchronisation */
- + NULL, /* no character bound synchronisation */
- pps_rawdcf, /* examining PPS information */
- snt_rawdcf, /* synthesize time code from input */
- (void *)0, /* buffer bit representation */
- @@ -314,12 +319,14 @@
- * raw dcf input routine - needs to fix up 50 baud
- * characters for 1/0 decision
- */
- -static u_long cvt_rawdcf(buffer, size, param, clock)
- - register unsigned char *buffer;
- - register int size;
- - register void *param;
- +static u_long cvt_rawdcf(bp, size, vf, clock, vt)
- + register char *bp;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register unsigned char *buffer = (unsigned char *) bp;
- register unsigned char *s = buffer;
- register unsigned char *e = buffer + size;
- register unsigned char *b = dcfparam.onebits;
- @@ -366,7 +373,7 @@
- }
- else
- {
- - parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: character check for 0x%x@%d FAILED\n", *s, s - buffer));
- + parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: character check for 0x%x@%ld FAILED\n", *s, (long)(s - buffer)));
- *s = ~0;
- rtc = CVT_FAIL|CVT_BADFMT;
- }
- diff -urN xntp3-5.93d/libparse/clk_rcc8000.c xntp3-5.93e/libparse/clk_rcc8000.c
- --- xntp3-5.93d/libparse/clk_rcc8000.c Mon Jan 20 22:02:06 1997
- +++ xntp3-5.93e/libparse/clk_rcc8000.c Mon Aug 10 18:17:35 1998
- @@ -52,15 +52,15 @@
- 0
- };
-
- -static unsigned long cvt_rcc8000();
- +static u_long cvt_rcc8000 P((char *, unsigned int, void *, clocktime_t *, void *));
-
- clockformat_t clock_rcc8000 =
- {
- - (unsigned long (*)())0, /* no input handling */
- - cvt_rcc8000, /* Radiocode clock conversion */
- + NULL, /* no input handling */
- + cvt_rcc8000, /* Radiocode clock conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- - (unsigned long (*)())0, /* no direct PPS monitoring */
- - (unsigned long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* no direct PPS monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&rcc8000_fmt, /* conversion configuration */
- "Radiocode RCC8000",
- 31, /* string buffer */
- @@ -73,12 +73,14 @@
- };
-
- static unsigned long
- -cvt_rcc8000(buffer, size, format, clock)
- +cvt_rcc8000(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register struct format *format = vf;
- if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
- #define OFFS(x) format->field_offsets[(x)].offset
- #define STOI(x, y) Stoi(&buffer[OFFS(x)], y, format->field_offsets[(x)].length)
- diff -urN xntp3-5.93d/libparse/clk_schmid.c xntp3-5.93e/libparse/clk_schmid.c
- --- xntp3-5.93d/libparse/clk_schmid.c Mon Jan 20 22:02:06 1997
- +++ xntp3-5.93e/libparse/clk_schmid.c Mon Aug 10 18:17:35 1998
- @@ -63,15 +63,15 @@
- #define WS_MEST 0x04
- #define WS_LEAP 0x10
-
- -static u_long cvt_schmid();
- +static u_long cvt_schmid P((char *, unsigned int, void *, clocktime_t *, void *));
-
- clockformat_t clock_schmid =
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_schmid, /* Schmid conversion */
- syn_simple, /* easy time stamps */
- - (u_long (*)())0, /* not direct PPS monitoring */
- - (u_long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* not direct PPS monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)0, /* conversion configuration */
- "Schmid", /* Schmid receiver */
- 12, /* binary data buffer */
- @@ -85,12 +85,14 @@
-
-
- static u_long
- -cvt_schmid(buffer, size, format, clock)
- - register unsigned char *buffer;
- - register int size;
- - register struct format *format;
- +cvt_schmid(bp, size, vf, clock, vt)
- + register char *bp;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register unsigned char *buffer = (unsigned char *) bp;
- if ((size != 11) || (buffer[10] != (unsigned char)'\375'))
- {
- return CVT_NONE;
- diff -urN xntp3-5.93d/libparse/clk_trimtaip.c xntp3-5.93e/libparse/clk_trimtaip.c
- --- xntp3-5.93d/libparse/clk_trimtaip.c Mon Jan 20 22:02:06 1997
- +++ xntp3-5.93e/libparse/clk_trimtaip.c Mon Aug 10 18:17:35 1998
- @@ -43,15 +43,18 @@
- 0
- };
-
- -static unsigned long cvt_trimtaip();
-
- +
- +/* clk_trimtaip.c */
- +static u_long cvt_trimtaip P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- clockformat_t clock_trimtaip =
- {
- - (unsigned long (*)())0, /* no input handling */
- + NULL, /* no input handling */
- cvt_trimtaip, /* Trimble conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- pps_simple, /* easy PPS monitoring */
- - (unsigned long (*)())0, /* no time code synthesizer monitoring */
- + NULL, /* no time code synthesizer monitoring */
- (void *)&trimsv6_fmt, /* conversion configuration */
- "Trimble SV6/TAIP",
- 37, /* string buffer */
- @@ -63,13 +66,15 @@
- '\0'
- };
-
- -static unsigned long
- -cvt_trimtaip(buffer, size, format, clock)
- +static u_long
- +cvt_trimtaip(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- + register void *vt;
- {
- + register struct format *format = vf;
- long gpsfix;
- u_char calc_csum = 0;
- long recv_csum;
- diff -urN xntp3-5.93d/libparse/clk_trimtsip.c xntp3-5.93e/libparse/clk_trimtsip.c
- --- xntp3-5.93d/libparse/clk_trimtsip.c Wed May 7 22:20:25 1997
- +++ xntp3-5.93e/libparse/clk_trimtsip.c Mon Aug 10 18:17:35 1998
- @@ -104,8 +104,11 @@
- u_char t_leap; /* possible leap warning */
- };
-
- -static unsigned long inp_tsip();
- -static unsigned long cvt_trimtsip();
- +static u_long inp_tsip P((parse_t *, unsigned int, timestamp_t *));
- +static u_long cvt_trimtsip P((char *, unsigned int, void *, clocktime_t *, void *));
- +static float getflt P((u_char *));
- +static double getdbl P((u_char *));
- +static int getint P((u_char *));
-
- struct clockformat clock_trimtsip =
- {
- @@ -113,8 +116,8 @@
- cvt_trimtsip, /* Trimble TSIP conversion */
- syn_simple, /* easy time stamps for RS232 (fallback) */
- pps_simple, /* easy PPS monitoring */
- - (unsigned long (*)())0, /* no time code synthesizer monitoring */
- - (void *)0, /* no configuration data */
- + NULL, /* no time code synthesizer monitoring */
- + NULL, /* no configuration data */
- "Trimble SV6/TSIP",
- 128, /* input buffer */
- CVT_FIXEDONLY, /* we do our own input handling */
- @@ -131,9 +134,10 @@
- #define DLE 0x10
- #define ETX 0x03
-
- +
- static unsigned long inp_tsip(parseio, ch, ctime)
- register parse_t *parseio;
- - register unsigned char ch;
- + register unsigned int ch;
- register timestamp_t *ctime;
- {
- register struct trimble *t = (struct trimble *)parseio->parse_pdata;
- @@ -213,13 +217,14 @@
- * convert TSIP type format
- */
- static unsigned long
- -cvt_trimtsip(buffer, size, format, clock, t)
- +cvt_trimtsip(buffer, size, vf, clock, vt)
- register char *buffer;
- - register int size;
- - register struct format *format;
- + register unsigned int size;
- + register void *vf;
- register clocktime_t *clock;
- - register struct trimble *t;
- + register void *vt;
- {
- + register struct trimble *t = vt;
- #define mb(_X_) (buffer[2+(_X_)]) /* shortcut for buffer access */
- register u_char cmd;
-
- diff -urN xntp3-5.93d/libparse/parse.c xntp3-5.93e/libparse/parse.c
- --- xntp3-5.93d/libparse/parse.c Thu Jul 10 23:19:33 1997
- +++ xntp3-5.93e/libparse/parse.c Mon Aug 10 18:17:44 1998
- @@ -73,7 +73,11 @@
- extern clockformat_t *clockformats[];
- extern unsigned short nformats;
-
- -static u_long timepacket();
- +static int Strlen P((char *));
- +static int Strcmp P((char *, char *));
- +static int timedout P((parse_t *, timestamp_t *));
- +static int setup_bitmaps P((parse_t *, unsigned int, unsigned int));
- +static u_long timepacket P((parse_t *));
-
- /*
- * strings support usually not in kernel - duplicated, but what the heck
- @@ -160,8 +164,8 @@
- static int
- setup_bitmaps(parseio, low, high)
- register parse_t *parseio;
- - register unsigned short low;
- - register unsigned short high;
- + register unsigned int low;
- + register unsigned int high;
- {
- register unsigned short i;
- register int f = 0;
- @@ -834,10 +838,10 @@
- */
- /*ARGSUSED*/
- void
- -syn_simple(parseio, ts, format, why)
- +syn_simple(parseio, ts, vf, why)
- register parse_t *parseio;
- register timestamp_t *ts;
- - register struct format *format;
- + register void *vf;
- register u_long why;
- {
- parseio->parse_dtime.parse_stime = *ts;
- diff -urN xntp3-5.93d/ntpdate/ntpdate.c xntp3-5.93e/ntpdate/ntpdate.c
- --- xntp3-5.93d/ntpdate/ntpdate.c Tue Mar 3 00:55:25 1998
- +++ xntp3-5.93e/ntpdate/ntpdate.c Mon Aug 10 18:33:04 1998
- @@ -220,6 +220,9 @@
- #endif /* SYS_WINNT */
-
- #ifdef NO_MAIN_ALLOWED
- +void ntpdatemain P((int, char *[]));
- +
- +void
- CALL(ntpdate,"ntpdate",ntpdatemain);
-
- void clear_globals()
- @@ -280,17 +283,18 @@
- always_step = 0;
- never_step = 0;
- }
- +#else
- +int main P((int, char *[]));
- #endif
-
- /*
- * Main program. Initialize us and loop waiting for I/O and/or
- * timer expiries.
- */
- -void
- #ifndef NO_MAIN_ALLOWED
- -main
- +int main
- #else
- -ntpdatemain
- +void ntpdatemain
- #endif /* NO_MAIN_ALLOWED */
- (argc, argv)
- int argc;
- @@ -332,7 +336,7 @@
- /*
- * Decode argument list
- */
- - while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != EOF)
- + while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != -1)
- switch (c)
- {
- case 'a':
- diff -urN xntp3-5.93d/ntpq/ntpq.c xntp3-5.93e/ntpq/ntpq.c
- --- xntp3-5.93d/ntpq/ntpq.c Thu Mar 5 22:02:16 1998
- +++ xntp3-5.93e/ntpq/ntpq.c Mon Aug 10 18:14:45 1998
- @@ -434,6 +434,7 @@
- int debug;
-
- #ifdef NO_MAIN_ALLOWED
- +void ntpqmain P((int, char *[]));
- CALL(ntpq,"ntpq",ntpqmain);
-
- void clear_globals()
- @@ -449,17 +450,16 @@
- numcmds = 0;
- numhosts = 0;
- }
- +#else
- +int main P((int, char *[]));
- #endif
- /*
- * main - parse arguments and handle options
- */
- -#if !defined(VMS)
- -void
- -#endif /* VMS */
- #ifndef NO_MAIN_ALLOWED
- -main
- +int main
- #else
- -ntpqmain
- +void ntpqmain
- #endif
- (argc, argv)
- int argc;
- @@ -478,7 +478,7 @@
- delay_time.l_uf = DEFDELAY;
-
- progname = argv[0];
- - while ((c = ntp_getopt(argc, argv, "c:dinp")) != EOF)
- + while ((c = ntp_getopt(argc, argv, "c:dinp")) != -1)
- switch (c) {
- case 'c':
- ADDCMD(ntp_optarg);
- diff -urN xntp3-5.93d/ntptrace/ntptrace.c xntp3-5.93e/ntptrace/ntptrace.c
- --- xntp3-5.93d/ntptrace/ntptrace.c Sun Aug 10 21:23:32 1997
- +++ xntp3-5.93e/ntptrace/ntptrace.c Mon Aug 10 18:15:13 1998
- @@ -108,13 +108,17 @@
- * timer expiries.
- */
- #ifdef NO_MAIN_ALLOWED
- +void ntptracemain P((int, char *[]));
- +
- CALL(ntptrace,"ntptrace",ntptracemain);
- +#else
- +int main P((int, char *[]));
- #endif
- -void
- +
- #ifndef NO_MAIN_ALLOWED
- -main
- +int main
- #else
- -ntptracemain
- +void ntptracemain
- #endif /* NO_MAIN_ALLOWED */
- (argc, argv)
- int argc;
- @@ -138,7 +142,7 @@
- /*
- * Decode argument list
- */
- - while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != EOF)
- + while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != -1)
- switch (c) {
- case 'd':
- ++debug;
- diff -urN xntp3-5.93d/patches/inbox/12 xntp3-5.93e/patches/inbox/12
- --- xntp3-5.93d/patches/inbox/12
- +++ xntp3-5.93e/patches/inbox/12 Mon Aug 10 18:05:35 1998
- @@ -0,0 +1,1960 @@
- +Received: from mail.eecis.udel.edu by whimsy.udel.edu id aa06167;
- + 10 Aug 1998 17:49 EDT
- +Received: from localhost (localhost [[UNIX: localhost]])
- + by hrothgar.gw.com (8.9.1/8.8.6.Beta0/2.1.kim) id RAA10454
- + for stenn@whimsy.udel.edu; Mon, 10 Aug 1998 17:49:39 -0400 (EDT)
- +Message-Id: <199808102149.RAA10454@hrothgar.gw.com>
- +From: Christos Zoulas <christos@zoulas.com>
- +Date: Mon, 10 Aug 1998 17:49:39 -0400
- +In-Reply-To: <4827.902780923@whimsy.udel.edu>
- + from stenn@whimsy.udel.edu (Aug 10, 4:28pm)
- +Organization: Astron Software
- +X-Mailer: Mail User's Shell (7.2.6 beta(2)+dynamic 2/29/96)
- +To: stenn@whimsy.udel.edu
- +Subject: Re: xntp patches
- +
- +On Aug 10, 4:28pm, stenn@whimsy.udel.edu (stenn@whimsy.udel.edu) wrote:
- +-- Subject: Re: xntp patches
- +
- +| Christos,
- +|
- +| Did you apply the 3 patches to 5.93 that are out there?
- +|
- +| If they don't fix the problems, please send me the patches again (sorry,
- +| but I have *ton* of email here and the patches you describe don't seem
- +| to be "handy") and I'll wrap them up with the 3 existing patches and
- +| cut a 5.94 release.
- +|
- +| Harlan
- +
- +Here it is again; most of the fixes, except the md5 stuff are non-controvercial.
- +Note that the structure of the directories is a bit different than the standard
- +distribution. Also I have mandoc pages for the main programs re-written from the
- +html pages; maybe we could automate their generation.
- +
- +christos
- +
- +- Use the latest version of the mdX routines if __NetBSD__
- +- Add missing prototypes
- +- Don't compare against EOF in ntp_getopt; the getopt functions are defined
- + to return -1.
- +- NetBSD is broken with respect to clock_settime in that it does not
- + define CLOCK_REALTIME yet. Check for that.
- +- Make functions in the function lists have consistant signatures and
- + widen prototypes where necessary.
- +- Fix a printf argument.
- +- make main declarations consistant; use int main instead of void always,
- + and add prototypes for the appropriate main function.
- +
- +diff -rc old/lib/libntp/a_md512crypt.c new/lib/libntp/a_md512crypt.c
- +*** old/lib/libntp/a_md512crypt.c Mon Aug 10 17:42:48 1998
- +--- new/lib/libntp/a_md512crypt.c Mon Aug 10 17:40:19 1998
- +***************
- +*** 74,79 ****
- +--- 74,82 ----
- + u_int32 *pkt;
- + int length; /* total length of encrypted area */
- + {
- ++ #ifdef __NetBSD__
- ++ unsigned char hash[16];
- ++ #endif
- + /*
- + * Don't bother checking the keys. The first stage would have
- + * handled that. Finish up the generation by also including the
- +***************
- +*** 81,90 ****
- + */
- +
- + MD5Update(&ctx, (unsigned const char *)(pkt) + length - 8, 8);
- + MD5Final(&ctx);
- +
- + memmove((char *) &pkt[NOCRYPT_int32S + length/sizeof(u_int32)],
- +! (char *) ctx.digest,
- + BLOCK_OCTETS);
- + return (4 + BLOCK_OCTETS);
- + }
- +--- 84,101 ----
- + */
- +
- + MD5Update(&ctx, (unsigned const char *)(pkt) + length - 8, 8);
- ++ #ifdef __NetBSD__
- ++ MD5Final(hash, &ctx);
- ++ #else
- + MD5Final(&ctx);
- ++ #endif
- +
- + memmove((char *) &pkt[NOCRYPT_int32S + length/sizeof(u_int32)],
- +! #ifdef __NetBSD__
- +! (char *) hash,
- +! #else
- +! (char *) ctx.digest,
- +! #endif
- + BLOCK_OCTETS);
- + return (4 + BLOCK_OCTETS);
- + }
- +diff -rc old/lib/libntp/a_md5decrypt.c new/lib/libntp/a_md5decrypt.c
- +*** old/lib/libntp/a_md5decrypt.c Mon Aug 10 17:42:48 1998
- +--- new/lib/libntp/a_md5decrypt.c Mon Aug 10 17:39:56 1998
- +***************
- +*** 39,44 ****
- +--- 39,47 ----
- + int length; /* length of variable data in octets */
- + {
- + MD5_CTX ctx;
- ++ #ifdef __NetBSD__
- ++ unsigned char hash[16];
- ++ #endif
- +
- + authdecryptions++;
- +
- +***************
- +*** 51,59 ****
- + MD5Init(&ctx);
- + MD5Update(&ctx, (unsigned const char *)cache_key, cache_keylen);
- + MD5Update(&ctx, (unsigned const char *)pkt, length);
- + MD5Final(&ctx);
- +
- +! return (!memcmp((const char *)ctx.digest,
- + (const char *)pkt + length + 4,
- + BLOCK_OCTETS));
- + }
- +--- 54,71 ----
- + MD5Init(&ctx);
- + MD5Update(&ctx, (unsigned const char *)cache_key, cache_keylen);
- + MD5Update(&ctx, (unsigned const char *)pkt, length);
- ++ #ifdef __NetBSD__
- ++ MD5Final(hash, &ctx);
- ++ #else
- + MD5Final(&ctx);
- ++ #endif
- +
- +! return (!memcmp(
- +! #ifdef __NetBSD__
- +! (const char *) hash,
- +! #else
- +! (const char *) ctx.digest,
- +! #endif
- + (const char *)pkt + length + 4,
- + BLOCK_OCTETS));
- + }
- +diff -rc old/lib/libntp/a_md5encrypt.c new/lib/libntp/a_md5encrypt.c
- +*** old/lib/libntp/a_md5encrypt.c Mon Aug 10 17:42:48 1998
- +--- new/lib/libntp/a_md5encrypt.c Mon Aug 10 17:39:28 1998
- +***************
- +*** 45,50 ****
- +--- 45,53 ----
- + {
- + MD5_CTX ctx;
- + int len; /* in 4 byte quantities */
- ++ #ifdef __NetBSD__
- ++ unsigned char hash[16];
- ++ #endif
- +
- + authencryptions++;
- +
- +***************
- +*** 64,73 ****
- + MD5Init(&ctx);
- + MD5Update(&ctx, (unsigned const char *)cache_key, cache_keylen);
- + MD5Update(&ctx, (unsigned const char *)pkt, length);
- + MD5Final(&ctx);
- +
- + memmove((char *)&pkt[NOCRYPT_int32S + len],
- +! (char *)ctx.digest,
- + BLOCK_OCTETS);
- + return (4 + BLOCK_OCTETS); /* return size of key and MAC */
- + }
- +--- 67,84 ----
- + MD5Init(&ctx);
- + MD5Update(&ctx, (unsigned const char *)cache_key, cache_keylen);
- + MD5Update(&ctx, (unsigned const char *)pkt, length);
- ++ #ifdef __NetBSD__
- ++ MD5Final(hash, &ctx);
- ++ #else
- + MD5Final(&ctx);
- ++ #endif
- +
- + memmove((char *)&pkt[NOCRYPT_int32S + len],
- +! #ifdef __NetBSD__
- +! (char *) hash,
- +! #else
- +! (char *) ctx.digest,
- +! #endif
- + BLOCK_OCTETS);
- + return (4 + BLOCK_OCTETS); /* return size of key and MAC */
- + }
- +diff -rc old/lib/libntp/getopt.c new/lib/libntp/getopt.c
- +*** old/lib/libntp/getopt.c Mon Aug 10 17:42:49 1998
- +--- new/lib/libntp/getopt.c Mon Aug 10 17:38:40 1998
- +***************
- +*** 30,35 ****
- +--- 30,37 ----
- + static char *scan = NULL; /* Private scan pointer. */
- + static const char *prog = "amnesia";
- +
- ++ static int badopt P((char *, int));
- ++
- + /*
- + * Print message about a bad option.
- + */
- +diff -rc old/lib/libntp/humandate.c new/lib/libntp/humandate.c
- +*** old/lib/libntp/humandate.c Mon Aug 10 17:42:49 1998
- +--- new/lib/libntp/humandate.c Mon Aug 10 17:38:05 1998
- +***************
- +*** 20,25 ****
- +--- 20,27 ----
- + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
- + };
- +
- ++ char *humanlogtime P((void));
- ++
- + char *
- + humandate(ntptime)
- + u_long ntptime;
- +diff -rc old/lib/libntp/lib_strbuf.h new/lib/libntp/lib_strbuf.h
- +*** old/lib/libntp/lib_strbuf.h Mon Aug 10 17:42:50 1998
- +--- new/lib/libntp/lib_strbuf.h Mon Aug 10 17:37:23 1998
- +***************
- +*** 25,27 ****
- +--- 25,29 ----
- + extern char lib_stringbuf[LIB_NUMBUFS][LIB_BUFLENGTH];
- + extern int lib_nextbuf;
- + extern int lib_inited;
- ++
- ++ void init_lib P((void));
- +diff -rc old/lib/libntp/machines.c new/lib/libntp/machines.c
- +*** old/lib/libntp/machines.c Mon Aug 10 17:42:50 1998
- +--- new/lib/libntp/machines.c Mon Aug 10 17:36:25 1998
- +***************
- +*** 112,118 ****
- + }
- + #endif /* SYS_PTX */
- +
- +! #ifdef HAVE_CLOCK_SETTIME
- + const char *set_tod_using = "clock_settime";
- +
- + /*#include <time.h> */
- +--- 112,118 ----
- + }
- + #endif /* SYS_PTX */
- +
- +! #if defined(HAVE_CLOCK_SETTIME) && defined(CLOCK_REALTIME)
- + const char *set_tod_using = "clock_settime";
- +
- + /*#include <time.h> */
- +***************
- +*** 131,137 ****
- + return clock_settime(CLOCK_REALTIME, &ts);
- + }
- +
- +! #else /* not HAVE_CLOCK_SETTIME */
- + # ifdef HAVE_SETTIMEOFDAY
- + const char *set_tod_using = "settimeofday";
- + # else /* not (HAVE_SETTIMEOFDAY || HAVE_CLOCK_SETTIME) */
- +--- 131,137 ----
- + return clock_settime(CLOCK_REALTIME, &ts);
- + }
- +
- +! #else /* not HAVE_CLOCK_SETTIME || not CLOCK_REALTIME */
- + # ifdef HAVE_SETTIMEOFDAY
- + const char *set_tod_using = "settimeofday";
- + # else /* not (HAVE_SETTIMEOFDAY || HAVE_CLOCK_SETTIME) */
- +Only in new/lib/libntp: obj.i386
- +diff -rc old/usr.sbin/xntp/Makefile.inc new/usr.sbin/xntp/Makefile.inc
- +*** old/usr.sbin/xntp/Makefile.inc Mon Aug 10 17:42:55 1998
- +--- new/usr.sbin/xntp/Makefile.inc Mon Aug 10 15:45:34 1998
- +***************
- +*** 1,5 ****
- + # $NetBSD: $
- +! WARNS?= 0
- + CPPFLAGS += -I${.CURDIR}/../include -DHAVE_CONFIG_H
- + LDADD += -lntp
- + DPADD += ${LIBNTP}
- +--- 1,5 ----
- + # $NetBSD: $
- +! WARNS?= 1
- + CPPFLAGS += -I${.CURDIR}/../include -DHAVE_CONFIG_H
- + LDADD += -lntp
- + DPADD += ${LIBNTP}
- +diff -rc old/usr.sbin/xntp/include/parse.h new/usr.sbin/xntp/include/parse.h
- +*** old/usr.sbin/xntp/include/parse.h Mon Aug 10 17:42:52 1998
- +--- new/usr.sbin/xntp/include/parse.h Mon Aug 10 15:54:23 1998
- +***************
- +*** 335,345 ****
- +
- + struct clockformat
- + {
- +! u_long (*input)(); /* special input protocol - implies fixed format */
- +! u_long (*convert)(); /* conversion routine */
- +! void (*syncevt)(); /* routine for handling RS232 sync events (time stamps) */
- +! u_long (*syncpps)(); /* PPS input routine */
- +! u_long (*synth)(); /* time code synthesizer */
- + void *data; /* local parameters */
- + char *name; /* clock format name */
- + unsigned short length; /* maximum length of data packet */
- +--- 335,350 ----
- +
- + struct clockformat
- + {
- +! u_long (*input) /* special input protocol - implies fixed format */
- +! P((parse_t *, unsigned int, timestamp_t *));
- +! u_long (*convert) /* conversion routine */
- +! P((char *, unsigned int, void *, clocktime_t *, void *));
- +! void (*syncevt) /* routine for handling RS232 sync events (time stamps) */
- +! P((parse_t *, timestamp_t *, void *, u_long));
- +! u_long (*syncpps) /* PPS input routine */
- +! P((parse_t *, int, timestamp_t *));
- +! u_long (*synth) /* time code synthesizer */
- +! P((parse_t *, timestamp_t *));
- + void *data; /* local parameters */
- + char *name; /* clock format name */
- + unsigned short length; /* maximum length of data packet */
- +***************
- +*** 371,377 ****
- +
- + extern time_t parse_to_unixtime P((clocktime_t *, u_long *));
- + extern u_long updatetimeinfo P((parse_t *, time_t, u_long, u_long));
- +! extern void syn_simple P((parse_t *, timestamp_t *, struct format *, u_long));
- + extern u_long pps_simple P((parse_t *, int, timestamp_t *));
- + #endif
- +
- +--- 376,382 ----
- +
- + extern time_t parse_to_unixtime P((clocktime_t *, u_long *));
- + extern u_long updatetimeinfo P((parse_t *, time_t, u_long, u_long));
- +! extern void syn_simple P((parse_t *, timestamp_t *, void *, u_long));
- + extern u_long pps_simple P((parse_t *, int, timestamp_t *));
- + #endif
- +
- +diff -rc old/usr.sbin/xntp/ntpdate/ntpdate.c new/usr.sbin/xntp/ntpdate/ntpdate.c
- +*** old/usr.sbin/xntp/ntpdate/ntpdate.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/ntpdate/ntpdate.c Mon Aug 10 15:49:57 1998
- +***************
- +*** 69,80 ****
- + #define NTPDATE_PRIO (-12)
- + #else
- + #define NTPDATE_PRIO (100)
- +- #endif
- +-
- + #if defined(HAVE_TIMER_SETTIME) || defined (HAVE_TIMER_CREATE)
- + /* POSIX TIMERS - vxWorks doesn't have itimer - casey */
- + static timer_t ntpdate_timerid;
- + #endif
- +
- + /*
- + * Compatibility stuff for Version 2
- +--- 69,80 ----
- + #define NTPDATE_PRIO (-12)
- + #else
- + #define NTPDATE_PRIO (100)
- + #if defined(HAVE_TIMER_SETTIME) || defined (HAVE_TIMER_CREATE)
- + /* POSIX TIMERS - vxWorks doesn't have itimer - casey */
- + static timer_t ntpdate_timerid;
- + #endif
- ++ #endif
- ++
- +
- + /*
- + * Compatibility stuff for Version 2
- +***************
- +*** 220,225 ****
- +--- 220,228 ----
- + #endif /* SYS_WINNT */
- +
- + #ifdef NO_MAIN_ALLOWED
- ++ void ntpdatemain P((int, char *[]));
- ++
- ++ void
- + CALL(ntpdate,"ntpdate",ntpdatemain);
- +
- + void clear_globals()
- +***************
- +*** 280,296 ****
- + always_step = 0;
- + never_step = 0;
- + }
- + #endif
- +
- + /*
- + * Main program. Initialize us and loop waiting for I/O and/or
- + * timer expiries.
- + */
- +- void
- + #ifndef NO_MAIN_ALLOWED
- +! main
- + #else
- +! ntpdatemain
- + #endif /* NO_MAIN_ALLOWED */
- + (argc, argv)
- + int argc;
- +--- 283,300 ----
- + always_step = 0;
- + never_step = 0;
- + }
- ++ #else
- ++ int main P((int, char *[]));
- + #endif
- +
- + /*
- + * Main program. Initialize us and loop waiting for I/O and/or
- + * timer expiries.
- + */
- + #ifndef NO_MAIN_ALLOWED
- +! int main
- + #else
- +! void ntpdatemain
- + #endif /* NO_MAIN_ALLOWED */
- + (argc, argv)
- + int argc;
- +***************
- +*** 332,338 ****
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != EOF)
- + switch (c)
- + {
- + case 'a':
- +--- 336,342 ----
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != -1)
- + switch (c)
- + {
- + case 'a':
- +Only in new/usr.sbin/xntp/ntpdate: obj.i386
- +diff -rc old/usr.sbin/xntp/ntpq/ntpq.c new/usr.sbin/xntp/ntpq/ntpq.c
- +*** old/usr.sbin/xntp/ntpq/ntpq.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/ntpq/ntpq.c Mon Aug 10 15:49:45 1998
- +***************
- +*** 434,439 ****
- +--- 434,440 ----
- + int debug;
- +
- + #ifdef NO_MAIN_ALLOWED
- ++ void ntpqmain P((int, char *[]));
- + CALL(ntpq,"ntpq",ntpqmain);
- +
- + void clear_globals()
- +***************
- +*** 449,465 ****
- + numcmds = 0;
- + numhosts = 0;
- + }
- + #endif
- + /*
- + * main - parse arguments and handle options
- + */
- +- #if !defined(VMS)
- +- void
- +- #endif /* VMS */
- + #ifndef NO_MAIN_ALLOWED
- +! main
- + #else
- +! ntpqmain
- + #endif
- + (argc, argv)
- + int argc;
- +--- 450,465 ----
- + numcmds = 0;
- + numhosts = 0;
- + }
- ++ #else
- ++ int main P((int, char *[]));
- + #endif
- + /*
- + * main - parse arguments and handle options
- + */
- + #ifndef NO_MAIN_ALLOWED
- +! int main
- + #else
- +! void ntpqmain
- + #endif
- + (argc, argv)
- + int argc;
- +***************
- +*** 478,484 ****
- + delay_time.l_uf = DEFDELAY;
- +
- + progname = argv[0];
- +! while ((c = ntp_getopt(argc, argv, "c:dinp")) != EOF)
- + switch (c) {
- + case 'c':
- + ADDCMD(ntp_optarg);
- +--- 478,484 ----
- + delay_time.l_uf = DEFDELAY;
- +
- + progname = argv[0];
- +! while ((c = ntp_getopt(argc, argv, "c:dinp")) != -1)
- + switch (c) {
- + case 'c':
- + ADDCMD(ntp_optarg);
- +Only in new/usr.sbin/xntp/ntpq: obj.i386
- +diff -rc old/usr.sbin/xntp/ntptime/ntptime.c new/usr.sbin/xntp/ntptime/ntptime.c
- +*** old/usr.sbin/xntp/ntptime/ntptime.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/ntptime/ntptime.c Mon Aug 10 15:52:15 1998
- +***************
- +*** 20,25 ****
- +--- 20,26 ----
- + #include <sys/time.h>
- + #include <signal.h>
- + #include <errno.h>
- ++ #include <unistd.h>
- + #include <setjmp.h>
- + #include "ntp_fp.h"
- + #include "ntp_unixtime.h"
- +***************
- +*** 75,80 ****
- +--- 76,82 ----
- + #endif /* NTP_SYSCALLS_LIBC */
- + char *sprintb P((u_int, char *));
- + char *timex_state P((int));
- ++ int main P((int, char *[]));
- + int debug = 0;
- +
- + #ifdef SIGSYS
- +***************
- +*** 90,96 ****
- + char* progname;
- + static char optargs[] = "cde:f:hm:o:rs:t:";
- +
- +! void
- + main(argc, argv)
- + int argc;
- + char *argv[];
- +--- 92,98 ----
- + char* progname;
- + static char optargs[] = "cde:f:hm:o:rs:t:";
- +
- +! int
- + main(argc, argv)
- + int argc;
- + char *argv[];
- +***************
- +*** 108,116 ****
- + int cost = 0;
- + int rawtime = 0;
- +
- + memset((char *)&ntx, 0, sizeof(ntx));
- + progname = argv[0];
- +! while ((c = ntp_getopt(argc, argv, optargs)) != EOF) switch (c) {
- + case 'c':
- + cost++;
- + break;
- +--- 110,124 ----
- + int cost = 0;
- + int rawtime = 0;
- +
- ++ #ifdef __GNUC__
- ++ /* avoid vfork clobbering */
- ++ (void) &cost;
- ++ (void) &rawtime;
- ++ #endif
- ++
- + memset((char *)&ntx, 0, sizeof(ntx));
- + progname = argv[0];
- +! while ((c = ntp_getopt(argc, argv, optargs)) != -1) switch (c) {
- + case 'c':
- + cost++;
- + break;
- +Only in new/usr.sbin/xntp/ntptime: obj.i386
- +diff -rc old/usr.sbin/xntp/ntptrace/ntptrace.c new/usr.sbin/xntp/ntptrace/ntptrace.c
- +*** old/usr.sbin/xntp/ntptrace/ntptrace.c Mon Aug 10 17:42:55 1998
- +--- new/usr.sbin/xntp/ntptrace/ntptrace.c Mon Aug 10 15:53:23 1998
- +***************
- +*** 108,120 ****
- + * timer expiries.
- + */
- + #ifdef NO_MAIN_ALLOWED
- + CALL(ntptrace,"ntptrace",ntptracemain);
- + #endif
- +! void
- + #ifndef NO_MAIN_ALLOWED
- +! main
- + #else
- +! ntptracemain
- + #endif /* NO_MAIN_ALLOWED */
- + (argc, argv)
- + int argc;
- +--- 108,124 ----
- + * timer expiries.
- + */
- + #ifdef NO_MAIN_ALLOWED
- ++ void ntptracemain P((int, char *[]));
- ++
- + CALL(ntptrace,"ntptrace",ntptracemain);
- ++ #else
- ++ int main P((int, char *[]));
- + #endif
- +!
- + #ifndef NO_MAIN_ALLOWED
- +! int main
- + #else
- +! void ntptracemain
- + #endif /* NO_MAIN_ALLOWED */
- + (argc, argv)
- + int argc;
- +***************
- +*** 138,144 ****
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != EOF)
- + switch (c) {
- + case 'd':
- + ++debug;
- +--- 142,148 ----
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != -1)
- + switch (c) {
- + case 'd':
- + ++debug;
- +Only in new/usr.sbin/xntp/ntptrace: obj.i386
- +diff -rc old/usr.sbin/xntp/xntpd/clk_computime.c new/usr.sbin/xntp/xntpd/clk_computime.c
- +*** old/usr.sbin/xntp/xntpd/clk_computime.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_computime.c Mon Aug 10 17:20:31 1998
- +***************
- +*** 63,77 ****
- + 0
- + };
- +
- +! static u_long cvt_computime();
- +
- + clockformat_t clock_computime =
- + {
- +! (unsigned long (*) ()) 0, /* no input handling */
- + cvt_computime, /* Computime conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- +! (u_long (*)())0, /* no PPS monitoring */
- +! (u_long(*) ())0, /* no time code synthesizer monitoring */
- + (void *)&computime_fmt, /* conversion configuration */
- + "Diem's Computime Radio Clock", /* Computime Radio Clock */
- + 24, /* string buffer */
- +--- 63,77 ----
- + 0
- + };
- +
- +! static u_long cvt_computime P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- + clockformat_t clock_computime =
- + {
- +! NULL, /* no input handling */
- + cvt_computime, /* Computime conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- +! NULL, /* no PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&computime_fmt, /* conversion configuration */
- + "Diem's Computime Radio Clock", /* Computime Radio Clock */
- + 24, /* string buffer */
- +***************
- +*** 89,100 ****
- + * convert simple type format
- + */
- + static u_long
- +! cvt_computime(buffer, size, format, clock)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- +
- + if (!Strok(buffer, format->fixed_string)) {
- + return CVT_NONE;
- +--- 89,102 ----
- + * convert simple type format
- + */
- + static u_long
- +! cvt_computime(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register struct format *format = vf;
- +
- + if (!Strok(buffer, format->fixed_string)) {
- + return CVT_NONE;
- +diff -rc old/usr.sbin/xntp/xntpd/clk_dcf7000.c new/usr.sbin/xntp/xntpd/clk_dcf7000.c
- +*** old/usr.sbin/xntp/xntpd/clk_dcf7000.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_dcf7000.c Mon Aug 10 17:20:06 1998
- +***************
- +*** 40,54 ****
- + 0
- + };
- +
- +! static u_long cvt_dcf7000();
- +
- + clockformat_t clock_dcf7000 =
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_dcf7000, /* ELV DCF77 conversion */
- + syn_simple, /* easy time stamps */
- +! (u_long (*)())0, /* no direct PPS monitoring */
- +! (u_long (*)())0, /* no time code synthesizer monitoring */
- + (void *)&dcf7000_fmt, /* conversion configuration */
- + "ELV DCF7000", /* ELV clock */
- + 24, /* string buffer */
- +--- 40,54 ----
- + 0
- + };
- +
- +! static u_long cvt_dcf7000 P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- + clockformat_t clock_dcf7000 =
- + {
- +! NULL, /* no input handling */
- + cvt_dcf7000, /* ELV DCF77 conversion */
- + syn_simple, /* easy time stamps */
- +! NULL, /* no direct PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&dcf7000_fmt, /* conversion configuration */
- + "ELV DCF7000", /* ELV clock */
- + 24, /* string buffer */
- +***************
- +*** 66,77 ****
- + * convert dcf7000 type format
- + */
- + static u_long
- +! cvt_dcf7000(buffer, size, format, clock)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- + if (!Strok(buffer, format->fixed_string))
- + {
- + return CVT_NONE;
- +--- 66,79 ----
- + * convert dcf7000 type format
- + */
- + static u_long
- +! cvt_dcf7000(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register struct format *format = vf;
- + if (!Strok(buffer, format->fixed_string))
- + {
- + return CVT_NONE;
- +diff -rc old/usr.sbin/xntp/xntpd/clk_hopf6021.c new/usr.sbin/xntp/xntpd/clk_hopf6021.c
- +*** old/usr.sbin/xntp/xntpd/clk_hopf6021.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_hopf6021.c Mon Aug 10 17:19:50 1998
- +***************
- +*** 113,127 ****
- + ('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
- + -1)
- +
- +! static unsigned long cvt_hopf6021();
- +
- + clockformat_t clock_hopf6021 =
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_hopf6021, /* Radiocode clock conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- +! (unsigned long (*)())0, /* no direct PPS monitoring */
- +! (unsigned long (*)())0, /* no time code synthesizer monitoring */
- + (void *)&hopf6021_fmt, /* conversion configuration */
- + "hopf Funkuhr 6021", /* clock format name */
- + 19, /* string buffer */
- +--- 113,128 ----
- + ('A' <= (x) && (x) <= 'F') ? (x) - 'A' + 10 : \
- + -1)
- +
- +!
- +! static u_long cvt_hopf6021 P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- + clockformat_t clock_hopf6021 =
- + {
- +! NULL, /* no input handling */
- + cvt_hopf6021, /* Radiocode clock conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- +! NULL, /* no direct PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&hopf6021_fmt, /* conversion configuration */
- + "hopf Funkuhr 6021", /* clock format name */
- + 19, /* string buffer */
- +***************
- +*** 133,146 ****
- + 0 /* sync symbol */
- + };
- +
- +! static unsigned long
- +! cvt_hopf6021(buffer, size, format, clock)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- +! char status,weekday;
- +
- + if (!Strok(buffer, format->fixed_string))
- + {
- +--- 134,149 ----
- + 0 /* sync symbol */
- + };
- +
- +! static u_long
- +! cvt_hopf6021(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- +! register struct format *format = vf;
- +! int status,weekday;
- +
- + if (!Strok(buffer, format->fixed_string))
- + {
- +diff -rc old/usr.sbin/xntp/xntpd/clk_meinberg.c new/usr.sbin/xntp/xntpd/clk_meinberg.c
- +*** old/usr.sbin/xntp/xntpd/clk_meinberg.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_meinberg.c Mon Aug 10 17:19:33 1998
- +***************
- +*** 142,158 ****
- + }
- + };
- +
- +! static u_long cvt_meinberg();
- +! static u_long cvt_mgps();
- +
- + clockformat_t clock_meinberg[] =
- + {
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_meinberg, /* Meinberg conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! (u_long (*)())0, /* no time code synthesizer monitoring */
- + (void *)&meinberg_fmt[0], /* conversion configuration */
- + "Meinberg Standard", /* Meinberg simple format - beware */
- + 32, /* string buffer */
- +--- 142,159 ----
- + }
- + };
- +
- +!
- +! static u_long cvt_meinberg P((char *, unsigned int, void *, clocktime_t *, void *));
- +! static u_long cvt_mgps P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- + clockformat_t clock_meinberg[] =
- + {
- + {
- +! NULL, /* no input handling */
- + cvt_meinberg, /* Meinberg conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&meinberg_fmt[0], /* conversion configuration */
- + "Meinberg Standard", /* Meinberg simple format - beware */
- + 32, /* string buffer */
- +***************
- +*** 164,174 ****
- + '\0'
- + },
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_meinberg, /* Meinberg conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! (u_long (*)())0, /* no time code synthesizer monitoring */
- + (void *)&meinberg_fmt[1], /* conversion configuration */
- + "Meinberg Extended", /* Meinberg enhanced format */
- + 32, /* string buffer */
- +--- 165,175 ----
- + '\0'
- + },
- + {
- +! NULL, /* no input handling */
- + cvt_meinberg, /* Meinberg conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&meinberg_fmt[1], /* conversion configuration */
- + "Meinberg Extended", /* Meinberg enhanced format */
- + 32, /* string buffer */
- +***************
- +*** 180,190 ****
- + '\0'
- + },
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_mgps, /* Meinberg GPS166 conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! (u_long (*)())0, /* no time code synthesizer monitoring */
- + (void *)&meinberg_fmt[2], /* conversion configuration */
- + "Meinberg GPS Extended", /* Meinberg FAU GPS format */
- + 70, /* string buffer */
- +--- 181,191 ----
- + '\0'
- + },
- + {
- +! NULL, /* no input handling */
- + cvt_mgps, /* Meinberg GPS166 conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&meinberg_fmt[2], /* conversion configuration */
- + "Meinberg GPS Extended", /* Meinberg FAU GPS format */
- + 70, /* string buffer */
- +***************
- +*** 203,214 ****
- + * convert simple type format
- + */
- + static u_long
- +! cvt_meinberg(buffer, size, format, clock)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- + if (!Strok(buffer, format->fixed_string))
- + {
- + return CVT_NONE;
- +--- 204,217 ----
- + * convert simple type format
- + */
- + static u_long
- +! cvt_meinberg(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register struct format *format = vf;
- + if (!Strok(buffer, format->fixed_string))
- + {
- + return CVT_NONE;
- +***************
- +*** 332,343 ****
- + * convert Meinberg GPS format
- + */
- + static u_long
- +! cvt_mgps(buffer, size, format, clock)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- + if (!Strok(buffer, format->fixed_string))
- + {
- + return CVT_NONE;
- +--- 335,348 ----
- + * convert Meinberg GPS format
- + */
- + static u_long
- +! cvt_mgps(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register struct format *format = vf;
- + if (!Strok(buffer, format->fixed_string))
- + {
- + return CVT_NONE;
- +diff -rc old/usr.sbin/xntp/xntpd/clk_rawdcf.c new/usr.sbin/xntp/xntpd/clk_rawdcf.c
- +*** old/usr.sbin/xntp/xntpd/clk_rawdcf.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_rawdcf.c Mon Aug 10 17:19:12 1998
- +***************
- +*** 84,98 ****
- + * 59 - usually missing (minute indication), except for leap insertion
- + */
- +
- +! static u_long cvt_rawdcf();
- +! static u_long pps_rawdcf();
- +! static u_long snt_rawdcf();
- +
- + clockformat_t clock_rawdcf =
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_rawdcf, /* raw dcf input conversion */
- +! (void (*)())0, /* no character bound synchronisation */
- + pps_rawdcf, /* examining PPS information */
- + snt_rawdcf, /* synthesize time code from input */
- + (void *)0, /* buffer bit representation */
- +--- 84,103 ----
- + * 59 - usually missing (minute indication), except for leap insertion
- + */
- +
- +! /* clk_rawdcf.c */
- +! static u_long ext_bf P((char *, int, char *));
- +! static unsigned pcheck P((char *, int, char *));
- +! struct dcfparam;
- +! static u_long convert_rawdcf P((unsigned char *, int, struct dcfparam *, clocktime_t *));
- +! static u_long cvt_rawdcf P((char *, unsigned int, void *, clocktime_t *, void *));
- +! static u_long pps_rawdcf P((parse_t *, int, timestamp_t *));
- +! static u_long snt_rawdcf P((parse_t *, timestamp_t *));
- +
- + clockformat_t clock_rawdcf =
- + {
- +! NULL, /* no input handling */
- + cvt_rawdcf, /* raw dcf input conversion */
- +! NULL, /* no character bound synchronisation */
- + pps_rawdcf, /* examining PPS information */
- + snt_rawdcf, /* synthesize time code from input */
- + (void *)0, /* buffer bit representation */
- +***************
- +*** 314,325 ****
- + * raw dcf input routine - needs to fix up 50 baud
- + * characters for 1/0 decision
- + */
- +! static u_long cvt_rawdcf(buffer, size, param, clock)
- +! register unsigned char *buffer;
- +! register int size;
- +! register void *param;
- + register clocktime_t *clock;
- + {
- + register unsigned char *s = buffer;
- + register unsigned char *e = buffer + size;
- + register unsigned char *b = dcfparam.onebits;
- +--- 319,332 ----
- + * raw dcf input routine - needs to fix up 50 baud
- + * characters for 1/0 decision
- + */
- +! static u_long cvt_rawdcf(bp, size, vf, clock, vt)
- +! register char *bp;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register unsigned char *buffer = (unsigned char *) bp;
- + register unsigned char *s = buffer;
- + register unsigned char *e = buffer + size;
- + register unsigned char *b = dcfparam.onebits;
- +***************
- +*** 366,372 ****
- + }
- + else
- + {
- +! parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: character check for 0x%x@%d FAILED\n", *s, s - buffer));
- + *s = ~0;
- + rtc = CVT_FAIL|CVT_BADFMT;
- + }
- +--- 373,379 ----
- + }
- + else
- + {
- +! parseprintf(DD_RAWDCF,("parse: cvt_rawdcf: character check for 0x%x@%ld FAILED\n", *s, (long)(s - buffer)));
- + *s = ~0;
- + rtc = CVT_FAIL|CVT_BADFMT;
- + }
- +diff -rc old/usr.sbin/xntp/xntpd/clk_rcc8000.c new/usr.sbin/xntp/xntpd/clk_rcc8000.c
- +*** old/usr.sbin/xntp/xntpd/clk_rcc8000.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_rcc8000.c Mon Aug 10 17:18:50 1998
- +***************
- +*** 52,66 ****
- + 0
- + };
- +
- +! static unsigned long cvt_rcc8000();
- +
- + clockformat_t clock_rcc8000 =
- + {
- +! (unsigned long (*)())0, /* no input handling */
- +! cvt_rcc8000, /* Radiocode clock conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- +! (unsigned long (*)())0, /* no direct PPS monitoring */
- +! (unsigned long (*)())0, /* no time code synthesizer monitoring */
- + (void *)&rcc8000_fmt, /* conversion configuration */
- + "Radiocode RCC8000",
- + 31, /* string buffer */
- +--- 52,66 ----
- + 0
- + };
- +
- +! static u_long cvt_rcc8000 P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- + clockformat_t clock_rcc8000 =
- + {
- +! NULL, /* no input handling */
- +! cvt_rcc8000, /* Radiocode clock conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- +! NULL, /* no direct PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&rcc8000_fmt, /* conversion configuration */
- + "Radiocode RCC8000",
- + 31, /* string buffer */
- +***************
- +*** 73,84 ****
- + };
- +
- + static unsigned long
- +! cvt_rcc8000(buffer, size, format, clock)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- + if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
- + #define OFFS(x) format->field_offsets[(x)].offset
- + #define STOI(x, y) Stoi(&buffer[OFFS(x)], y, format->field_offsets[(x)].length)
- +--- 73,86 ----
- + };
- +
- + static unsigned long
- +! cvt_rcc8000(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register struct format *format = vf;
- + if (!Strok(buffer, format->fixed_string)) return CVT_NONE;
- + #define OFFS(x) format->field_offsets[(x)].offset
- + #define STOI(x, y) Stoi(&buffer[OFFS(x)], y, format->field_offsets[(x)].length)
- +diff -rc old/usr.sbin/xntp/xntpd/clk_schmid.c new/usr.sbin/xntp/xntpd/clk_schmid.c
- +*** old/usr.sbin/xntp/xntpd/clk_schmid.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_schmid.c Mon Aug 10 17:18:28 1998
- +***************
- +*** 63,77 ****
- + #define WS_MEST 0x04
- + #define WS_LEAP 0x10
- +
- +! static u_long cvt_schmid();
- +
- + clockformat_t clock_schmid =
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_schmid, /* Schmid conversion */
- + syn_simple, /* easy time stamps */
- +! (u_long (*)())0, /* not direct PPS monitoring */
- +! (u_long (*)())0, /* no time code synthesizer monitoring */
- + (void *)0, /* conversion configuration */
- + "Schmid", /* Schmid receiver */
- + 12, /* binary data buffer */
- +--- 63,77 ----
- + #define WS_MEST 0x04
- + #define WS_LEAP 0x10
- +
- +! static u_long cvt_schmid P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- + clockformat_t clock_schmid =
- + {
- +! NULL, /* no input handling */
- + cvt_schmid, /* Schmid conversion */
- + syn_simple, /* easy time stamps */
- +! NULL, /* not direct PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)0, /* conversion configuration */
- + "Schmid", /* Schmid receiver */
- + 12, /* binary data buffer */
- +***************
- +*** 85,96 ****
- +
- +
- + static u_long
- +! cvt_schmid(buffer, size, format, clock)
- +! register unsigned char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- + if ((size != 11) || (buffer[10] != (unsigned char)'\375'))
- + {
- + return CVT_NONE;
- +--- 85,98 ----
- +
- +
- + static u_long
- +! cvt_schmid(bp, size, vf, clock, vt)
- +! register char *bp;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register unsigned char *buffer = (unsigned char *) bp;
- + if ((size != 11) || (buffer[10] != (unsigned char)'\375'))
- + {
- + return CVT_NONE;
- +diff -rc old/usr.sbin/xntp/xntpd/clk_trimtaip.c new/usr.sbin/xntp/xntpd/clk_trimtaip.c
- +*** old/usr.sbin/xntp/xntpd/clk_trimtaip.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_trimtaip.c Mon Aug 10 17:18:04 1998
- +***************
- +*** 43,57 ****
- + 0
- + };
- +
- +! static unsigned long cvt_trimtaip();
- +
- + clockformat_t clock_trimtaip =
- + {
- +! (unsigned long (*)())0, /* no input handling */
- + cvt_trimtaip, /* Trimble conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! (unsigned long (*)())0, /* no time code synthesizer monitoring */
- + (void *)&trimsv6_fmt, /* conversion configuration */
- + "Trimble SV6/TAIP",
- + 37, /* string buffer */
- +--- 43,60 ----
- + 0
- + };
- +
- +!
- +!
- +! /* clk_trimtaip.c */
- +! static u_long cvt_trimtaip P((char *, unsigned int, void *, clocktime_t *, void *));
- +
- + clockformat_t clock_trimtaip =
- + {
- +! NULL, /* no input handling */
- + cvt_trimtaip, /* Trimble conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- + (void *)&trimsv6_fmt, /* conversion configuration */
- + "Trimble SV6/TAIP",
- + 37, /* string buffer */
- +***************
- +*** 63,75 ****
- + '\0'
- + };
- +
- +! static unsigned long
- +! cvt_trimtaip(buffer, size, format, clock)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- + {
- + long gpsfix;
- + u_char calc_csum = 0;
- + long recv_csum;
- +--- 66,80 ----
- + '\0'
- + };
- +
- +! static u_long
- +! cvt_trimtaip(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- ++ register void *vt;
- + {
- ++ register struct format *format = vf;
- + long gpsfix;
- + u_char calc_csum = 0;
- + long recv_csum;
- +diff -rc old/usr.sbin/xntp/xntpd/clk_trimtsip.c new/usr.sbin/xntp/xntpd/clk_trimtsip.c
- +*** old/usr.sbin/xntp/xntpd/clk_trimtsip.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/clk_trimtsip.c Mon Aug 10 17:17:37 1998
- +***************
- +*** 104,111 ****
- + u_char t_leap; /* possible leap warning */
- + };
- +
- +! static unsigned long inp_tsip();
- +! static unsigned long cvt_trimtsip();
- +
- + struct clockformat clock_trimtsip =
- + {
- +--- 104,114 ----
- + u_char t_leap; /* possible leap warning */
- + };
- +
- +! static u_long inp_tsip P((parse_t *, unsigned int, timestamp_t *));
- +! static u_long cvt_trimtsip P((char *, unsigned int, void *, clocktime_t *, void *));
- +! static float getflt P((u_char *));
- +! static double getdbl P((u_char *));
- +! static int getint P((u_char *));
- +
- + struct clockformat clock_trimtsip =
- + {
- +***************
- +*** 113,120 ****
- + cvt_trimtsip, /* Trimble TSIP conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! (unsigned long (*)())0, /* no time code synthesizer monitoring */
- +! (void *)0, /* no configuration data */
- + "Trimble SV6/TSIP",
- + 128, /* input buffer */
- + CVT_FIXEDONLY, /* we do our own input handling */
- +--- 116,123 ----
- + cvt_trimtsip, /* Trimble TSIP conversion */
- + syn_simple, /* easy time stamps for RS232 (fallback) */
- + pps_simple, /* easy PPS monitoring */
- +! NULL, /* no time code synthesizer monitoring */
- +! NULL, /* no configuration data */
- + "Trimble SV6/TSIP",
- + 128, /* input buffer */
- + CVT_FIXEDONLY, /* we do our own input handling */
- +***************
- +*** 131,139 ****
- + #define DLE 0x10
- + #define ETX 0x03
- +
- + static unsigned long inp_tsip(parseio, ch, ctime)
- + register parse_t *parseio;
- +! register unsigned char ch;
- + register timestamp_t *ctime;
- + {
- + register struct trimble *t = (struct trimble *)parseio->parse_pdata;
- +--- 134,143 ----
- + #define DLE 0x10
- + #define ETX 0x03
- +
- ++
- + static unsigned long inp_tsip(parseio, ch, ctime)
- + register parse_t *parseio;
- +! register unsigned int ch;
- + register timestamp_t *ctime;
- + {
- + register struct trimble *t = (struct trimble *)parseio->parse_pdata;
- +***************
- +*** 213,225 ****
- + * convert TSIP type format
- + */
- + static unsigned long
- +! cvt_trimtsip(buffer, size, format, clock, t)
- + register char *buffer;
- +! register int size;
- +! register struct format *format;
- + register clocktime_t *clock;
- +! register struct trimble *t;
- + {
- + #define mb(_X_) (buffer[2+(_X_)]) /* shortcut for buffer access */
- + register u_char cmd;
- +
- +--- 217,230 ----
- + * convert TSIP type format
- + */
- + static unsigned long
- +! cvt_trimtsip(buffer, size, vf, clock, vt)
- + register char *buffer;
- +! register unsigned int size;
- +! register void *vf;
- + register clocktime_t *clock;
- +! register void *vt;
- + {
- ++ register struct trimble *t = vt;
- + #define mb(_X_) (buffer[2+(_X_)]) /* shortcut for buffer access */
- + register u_char cmd;
- +
- +diff -rc old/usr.sbin/xntp/xntpd/ntp_config.c new/usr.sbin/xntp/xntpd/ntp_config.c
- +*** old/usr.sbin/xntp/xntpd/ntp_config.c Mon Aug 10 17:42:52 1998
- +--- new/usr.sbin/xntp/xntpd/ntp_config.c Mon Aug 10 17:25:57 1998
- +***************
- +*** 484,490 ****
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF)
- + switch (c) {
- + #ifdef DEBUG
- + case 'd':
- +--- 484,490 ----
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, xntp_options)) != -1)
- + switch (c) {
- + #ifdef DEBUG
- + case 'd':
- +***************
- +*** 646,652 ****
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF) {
- + switch (c) {
- + case 'a':
- + proto_config(PROTO_AUTHENTICATE, 1);
- +--- 646,652 ----
- + /*
- + * Decode argument list
- + */
- +! while ((c = ntp_getopt(argc, argv, xntp_options)) != -1) {
- + switch (c) {
- + case 'a':
- + proto_config(PROTO_AUTHENTICATE, 1);
- +diff -rc old/usr.sbin/xntp/xntpd/ntp_control.c new/usr.sbin/xntp/xntpd/ntp_control.c
- +*** old/usr.sbin/xntp/xntpd/ntp_control.c Mon Aug 10 17:42:52 1998
- +--- new/usr.sbin/xntp/xntpd/ntp_control.c Mon Aug 10 17:28:13 1998
- +***************
- +*** 28,34 ****
- + struct ctl_proc {
- + short control_code; /* defined request code */
- + u_short flags; /* flags word */
- +! void (*handler)(); /* routine to handle request */
- + };
- +
- + /*
- +--- 28,35 ----
- + struct ctl_proc {
- + short control_code; /* defined request code */
- + u_short flags; /* flags word */
- +! void (*handler) /* routine to handle request */
- +! P((struct recvbuf *, int));
- + };
- +
- + /*
- +diff -rc old/usr.sbin/xntp/xntpd/ntp_proto.c new/usr.sbin/xntp/xntpd/ntp_proto.c
- +*** old/usr.sbin/xntp/xntpd/ntp_proto.c Mon Aug 10 17:42:52 1998
- +--- new/usr.sbin/xntp/xntpd/ntp_proto.c Mon Aug 10 17:26:57 1998
- +***************
- +*** 103,108 ****
- +--- 103,110 ----
- + extern int debug;
- +
- + static void clear_all P((void));
- ++ static int default_get_precision P((void));
- ++
- +
- + /*
- + * transmit - Transmit Procedure. See Section 3.4.2 of the
- +diff -rc old/usr.sbin/xntp/xntpd/ntpd.c new/usr.sbin/xntp/xntpd/ntpd.c
- +*** old/usr.sbin/xntp/xntpd/ntpd.c Mon Aug 10 17:42:52 1998
- +--- new/usr.sbin/xntp/xntpd/ntpd.c Mon Aug 10 17:25:37 1998
- +***************
- +*** 168,187 ****
- + #endif /* not DEBUG */
- +
- + #ifdef NO_MAIN_ALLOWED
- + CALL(xntpd,"xntpd",xntpdmain);
- + #endif
- +
- + /*
- + * Main program. Initialize us, disconnect us from the tty if necessary,
- + * and loop waiting for I/O and/or timer expiries.
- + */
- +- #if !defined(VMS)
- +- void
- +- #endif /* VMS */
- + #ifndef NO_MAIN_ALLOWED
- +! main
- + #else
- +! xntpdmain
- + #endif
- + (argc, argv)
- + int argc;
- +--- 168,187 ----
- + #endif /* not DEBUG */
- +
- + #ifdef NO_MAIN_ALLOWED
- ++ void xntpdmain P((int, char *[]));
- + CALL(xntpd,"xntpd",xntpdmain);
- ++ #else
- ++ int main P((int, char *[]));
- + #endif
- +
- + /*
- + * Main program. Initialize us, disconnect us from the tty if necessary,
- + * and loop waiting for I/O and/or timer expiries.
- + */
- + #ifndef NO_MAIN_ALLOWED
- +! int main
- + #else
- +! void xntpdmain
- + #endif
- + (argc, argv)
- + int argc;
- +Only in new/usr.sbin/xntp/xntpd: obj.i386
- +diff -rc old/usr.sbin/xntp/xntpd/parse.c new/usr.sbin/xntp/xntpd/parse.c
- +*** old/usr.sbin/xntp/xntpd/parse.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpd/parse.c Mon Aug 10 17:20:52 1998
- +***************
- +*** 73,79 ****
- + extern clockformat_t *clockformats[];
- + extern unsigned short nformats;
- +
- +! static u_long timepacket();
- +
- + /*
- + * strings support usually not in kernel - duplicated, but what the heck
- +--- 73,83 ----
- + extern clockformat_t *clockformats[];
- + extern unsigned short nformats;
- +
- +! static int Strlen P((char *));
- +! static int Strcmp P((char *, char *));
- +! static int timedout P((parse_t *, timestamp_t *));
- +! static int setup_bitmaps P((parse_t *, unsigned int, unsigned int));
- +! static u_long timepacket P((parse_t *));
- +
- + /*
- + * strings support usually not in kernel - duplicated, but what the heck
- +***************
- +*** 160,167 ****
- + static int
- + setup_bitmaps(parseio, low, high)
- + register parse_t *parseio;
- +! register unsigned short low;
- +! register unsigned short high;
- + {
- + register unsigned short i;
- + register int f = 0;
- +--- 164,171 ----
- + static int
- + setup_bitmaps(parseio, low, high)
- + register parse_t *parseio;
- +! register unsigned int low;
- +! register unsigned int high;
- + {
- + register unsigned short i;
- + register int f = 0;
- +***************
- +*** 834,843 ****
- + */
- + /*ARGSUSED*/
- + void
- +! syn_simple(parseio, ts, format, why)
- + register parse_t *parseio;
- + register timestamp_t *ts;
- +! register struct format *format;
- + register u_long why;
- + {
- + parseio->parse_dtime.parse_stime = *ts;
- +--- 838,847 ----
- + */
- + /*ARGSUSED*/
- + void
- +! syn_simple(parseio, ts, vf, why)
- + register parse_t *parseio;
- + register timestamp_t *ts;
- +! register void *vf;
- + register u_long why;
- + {
- + parseio->parse_dtime.parse_stime = *ts;
- +diff -rc old/usr.sbin/xntp/xntpd/refclock_arc.c new/usr.sbin/xntp/xntpd/refclock_arc.c
- +*** old/usr.sbin/xntp/xntpd/refclock_arc.c Mon Aug 10 17:42:52 1998
- +--- new/usr.sbin/xntp/xntpd/refclock_arc.c Mon Aug 10 17:24:54 1998
- +***************
- +*** 446,452 ****
- + #define OPEN_FLAGS (O_RDWR)
- + #endif
- +
- +-
- + /*
- + * Imported from ntp_timer module
- + */
- +--- 446,451 ----
- +***************
- +*** 511,516 ****
- +--- 510,518 ----
- +
- + static void dummy_event_handler P((struct peer *));
- + static void arc_event_handler P((struct peer *));
- ++ static int space_left P((struct arcunit *));
- ++ static int send_slow P((struct arcunit *, int, char *));
- ++
- +
- + #define QUALITY_UNKNOWN -1 /* Indicates unknown clock quality. */
- + #define MIN_CLOCK_QUALITY 0 /* Min quality clock will return. */
- +diff -rc old/usr.sbin/xntp/xntpd/refclock_atom.c new/usr.sbin/xntp/xntpd/refclock_atom.c
- +*** old/usr.sbin/xntp/xntpd/refclock_atom.c Mon Aug 10 17:42:53 1998
- +--- new/usr.sbin/xntp/xntpd/refclock_atom.c Mon Aug 10 17:23:26 1998
- +***************
- +*** 111,117 ****
- +--- 111,119 ----
- + /*
- + * Imported from ntp_loopfilter module
- + */
- ++ #ifndef PPSX
- + extern int fdpps; /* pps file descriptor */
- ++ #endif /* PPSX */
- + extern int pps_update; /* prefer peer valid update */
- +
- + /*
- +***************
- +*** 144,149 ****
- +--- 146,152 ----
- + #ifdef PPS
- + static void atom_pps P((struct peer *));
- + #endif /* PPS */
- ++ static int atom_cmpl_fp P((const void *, const void *));
- +
- + /*
- + * Transfer vector
- +***************
- +*** 262,267 ****
- +--- 265,271 ----
- +
- + pp = peer->procptr;
- + up = (struct atomunit *)pp->unitptr;
- ++
- + #ifdef DEBUG
- + if (debug > 2)
- + printf("pps_sample: pollcnt %d\n", up->pollcnt);
- +***************
- +*** 371,378 ****
- + &pp->lastrec);
- + #ifdef DEBUG
- + if (debug > 2)
- +! printf("atom_receive: pollcnt %d, lastrec %ld\n",
- +! up->pollcnt, pp->lastrec);
- + #endif
- +
- + /*
- +--- 375,382 ----
- + &pp->lastrec);
- + #ifdef DEBUG
- + if (debug > 2)
- +! printf("atom_receive: pollcnt %d, lastrec %d\n",
- +! up->pollcnt, pp->lastrec.l_ui);
- + #endif
- +
- + /*
- +diff -rc old/usr.sbin/xntp/xntpd/refclock_heath.c new/usr.sbin/xntp/xntpd/refclock_heath.c
- +*** old/usr.sbin/xntp/xntpd/refclock_heath.c Mon Aug 10 17:42:53 1998
- +--- new/usr.sbin/xntp/xntpd/refclock_heath.c Mon Aug 10 17:22:05 1998
- +***************
- +*** 133,138 ****
- +--- 133,140 ----
- + static void heath_shutdown P((int, struct peer *));
- + static void heath_receive P((struct recvbuf *));
- + static void heath_poll P((int, struct peer *));
- ++ static int comparetm P((struct tm *, struct tm *));
- ++ static time_t invert P((struct tm *, struct tm *(*)(const time_t *)));
- +
- + /*
- + * Transfer vector
- +***************
- +*** 180,193 ****
- + return 0;
- + }
- +
- +! static long
- + invert(x, func)
- + struct tm *x;
- +! struct tm *(*func)();
- + {
- + struct tm *y;
- + int result;
- +! long trial;
- + long lower=0L;
- + long upper=(long)((unsigned long)(~lower) >> 1);
- +
- +--- 182,195 ----
- + return 0;
- + }
- +
- +! static time_t
- + invert(x, func)
- + struct tm *x;
- +! struct tm *(*func) P((const time_t *));
- + {
- + struct tm *y;
- + int result;
- +! time_t trial;
- + long lower=0L;
- + long upper=(long)((unsigned long)(~lower) >> 1);
- +
- +diff -rc old/usr.sbin/xntp/xntpd/refclock_parse.c new/usr.sbin/xntp/xntpd/refclock_parse.c
- +*** old/usr.sbin/xntp/xntpd/refclock_parse.c Mon Aug 10 17:42:53 1998
- +--- new/usr.sbin/xntp/xntpd/refclock_parse.c Mon Aug 10 17:21:33 1998
- +***************
- +*** 193,211 ****
- + ** function vector for dynamically binding io handling mechanism
- + **/
- +
- + typedef struct bind
- + {
- + char *bd_description; /* name of type of binding */
- +! int (*bd_init)(); /* initialize */
- +! void (*bd_end)(); /* end */
- +! int (*bd_setcs)(); /* set character size */
- +! int (*bd_disable)(); /* disable */
- +! int (*bd_enable)(); /* enable */
- +! int (*bd_getfmt)(); /* get format */
- +! int (*bd_setfmt)(); /* setfmt */
- +! int (*bd_timecode)(); /* get time code */
- +! void (*bd_receive)(); /* receive operation */
- +! void (*bd_poll)(); /* poll operation */
- + } bind_t;
- +
- + #define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)
- +--- 193,222 ----
- + ** function vector for dynamically binding io handling mechanism
- + **/
- +
- ++ struct parseunit;
- + typedef struct bind
- + {
- + char *bd_description; /* name of type of binding */
- +! int (*bd_init) /* initialize */
- +! P((struct parseunit *));
- +! void (*bd_end) /* end */
- +! P((struct parseunit *));
- +! int (*bd_setcs) /* set character size */
- +! P((struct parseunit *, parsectl_t *));
- +! int (*bd_disable) /* disable */
- +! P((struct parseunit *));
- +! int (*bd_enable) /* enable */
- +! P((struct parseunit *));
- +! int (*bd_getfmt) /* get format */
- +! P((struct parseunit *, parsectl_t *));
- +! int (*bd_setfmt) /* setfmt */
- +! P((struct parseunit *, parsectl_t *));
- +! int (*bd_timecode) /* get time code */
- +! P((struct parseunit *, parsectl_t *));
- +! void (*bd_receive) /* receive operation */
- +! P((struct recvbuf *));
- +! void (*bd_poll) /* poll operation */
- +! P((struct parseunit *));
- + } bind_t;
- +
- + #define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)
- +***************
- +*** 397,406 ****
- + } poll_info_t;
- +
- + #define NO_CL_FLAGS 0
- +! #define NO_POLL (void (*)())0
- +! #define NO_INIT (int (*)())0
- +! #define NO_END (void (*)())0
- +! #define NO_EVENT (void (*)())0
- + #define NO_DATA (void *)0
- + #define NO_FORMAT ""
- + #define NO_PPSDELAY 0
- +--- 408,417 ----
- + } poll_info_t;
- +
- + #define NO_CL_FLAGS 0
- +! #define NO_POLL (void (*) P((struct parseunit *)))0
- +! #define NO_INIT (int (*) P((struct parseunit *)))0
- +! #define NO_END (void (*) P((struct parseunit *)))0
- +! #define NO_EVENT (void (*) P((struct parseunit *, int)))0
- + #define NO_DATA (void *)0
- + #define NO_FORMAT ""
- + #define NO_PPSDELAY 0
- +***************
- +*** 764,773 ****
- + static struct parse_clockinfo
- + {
- + u_long cl_flags; /* operation flags (io modes) */
- +! void (*cl_poll)(); /* active poll routine */
- +! int (*cl_init)(); /* active poll init routine */
- +! void (*cl_event)(); /* special event handling (e.g. reset clock) */
- +! void (*cl_end)(); /* active poll end routine */
- + void *cl_data; /* local data area for "poll" mechanism */
- + u_fp cl_rootdelay; /* rootdelay */
- + u_long cl_basedelay; /* current offset - unsigned l_fp fractional part */
- +--- 775,788 ----
- + static struct parse_clockinfo
- + {
- + u_long cl_flags; /* operation flags (io modes) */
- +! void (*cl_poll) /* active poll routine */
- +! P((struct parseunit *));
- +! int (*cl_init) /* active poll init routine */
- +! P((struct parseunit *));
- +! void (*cl_event) /* special event handling (e.g. reset clock) */
- +! P((struct parseunit *, int));
- +! void (*cl_end) /* active poll end routine */
- +! P((struct parseunit *));
- + void *cl_data; /* local data area for "poll" mechanism */
- + u_fp cl_rootdelay; /* rootdelay */
- + u_long cl_basedelay; /* current offset - unsigned l_fp fractional part */
- +***************
- +*** 1261,1266 ****
- +--- 1276,1290 ----
- + static void local_receive P((struct recvbuf *));
- + static void local_poll P((struct parseunit *));
- +
- ++ static bind_t *init_iobinding P((struct parseunit *));
- ++ static char *parsestate P((u_long, char *));
- ++ static char *parsestatus P((u_long, char *));
- ++ static char *clockstatus P((u_long));
- ++ static char *mkascii P((char *, long, char *, long));
- ++ static void parse_statistics P((struct parseunit *));
- ++ static void cparse_statistics P((struct peer *));
- ++
- ++
- + static bind_t io_bindings[] =
- + {
- + #ifdef STREAM
- +***************
- +*** 4095,4101 ****
- + u_char *txt; /* pointer to actual data buffer */
- + };
- +
- +! void
- + sendcmd(buf, c)
- + struct txbuf *buf;
- + u_char c;
- +--- 4119,4133 ----
- + u_char *txt; /* pointer to actual data buffer */
- + };
- +
- +! static void sendcmd P((struct txbuf *, u_char));
- +! static void sendbyte P((struct txbuf *, u_char));
- +! static void sendetx P((struct txbuf *, struct parseunit *));
- +! #if 0
- +! static void sendint P((struct txbuf *, int));
- +! #endif
- +! static void sendflt P((struct txbuf *, double));
- +!
- +! static void
- + sendcmd(buf, c)
- + struct txbuf *buf;
- + u_char c;
- +***************
- +*** 4105,4111 ****
- + buf->idx = 2;
- + }
- +
- +! void sendbyte(buf, b)
- + struct txbuf *buf;
- + u_char b;
- + {
- +--- 4137,4144 ----
- + buf->idx = 2;
- + }
- +
- +! static void
- +! sendbyte(buf, b)
- + struct txbuf *buf;
- + u_char b;
- + {
- +***************
- +*** 4114,4120 ****
- + buf->txt[buf->idx++] = b;
- + }
- +
- +! void
- + sendetx(buf, parse)
- + struct txbuf *buf;
- + struct parseunit *parse;
- +--- 4147,4153 ----
- + buf->txt[buf->idx++] = b;
- + }
- +
- +! static void
- + sendetx(buf, parse)
- + struct txbuf *buf;
- + struct parseunit *parse;
- +***************
- +*** 4133,4139 ****
- + }
- + }
- +
- +! void
- + sendint(buf, a)
- + struct txbuf *buf;
- + int a;
- +--- 4166,4173 ----
- + }
- + }
- +
- +! #if 0
- +! static void
- + sendint(buf, a)
- + struct txbuf *buf;
- + int a;
- +***************
- +*** 4142,4149 ****
- + sendbyte(buf, (a>>8) & 0xff);
- + sendbyte(buf, a & 0xff);
- + }
- +
- +! void
- + sendflt(buf, a)
- + struct txbuf *buf;
- + float a;
- +--- 4176,4184 ----
- + sendbyte(buf, (a>>8) & 0xff);
- + sendbyte(buf, a & 0xff);
- + }
- ++ #endif
- +
- +! static void
- + sendflt(buf, a)
- + struct txbuf *buf;
- + float a;
- +diff -rc old/usr.sbin/xntp/xntpdc/ntpdc.c new/usr.sbin/xntp/xntpdc/ntpdc.c
- +*** old/usr.sbin/xntp/xntpdc/ntpdc.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpdc/ntpdc.c Mon Aug 10 17:31:01 1998
- +***************
- +*** 239,245 ****
- +--- 239,248 ----
- + int debug;
- +
- + #ifdef NO_MAIN_ALLOWED
- ++ void xntpdcmain P((int, char *[]));
- + CALL(xntpdc,"xntpdc",xntpdcmain);
- ++ #else
- ++ int main P((int, char *[]));
- + #endif
- +
- + #ifdef SYS_VXWORKS
- +***************
- +*** 260,272 ****
- + /*
- + * main - parse arguments and handle options
- + */
- +! #if !defined(VMS)
- +! void
- +! #endif /* VMS */
- +! #ifndef NO_MAIN_ALLOWED
- +! main
- + #else
- +! xntpdcmain
- + #endif
- + (argc, argv)
- + int argc;
- +--- 263,272 ----
- + /*
- + * main - parse arguments and handle options
- + */
- +! #ifdef NO_MAIN_ALLOWED
- +! void xntpdcmain
- + #else
- +! int main
- + #endif
- + (argc, argv)
- + int argc;
- +***************
- +*** 286,292 ****
- + #endif
- +
- + progname = argv[0];
- +! while ((c = ntp_getopt(argc, argv, "c:dilnps")) != EOF)
- + switch (c) {
- + case 'c':
- + ADDCMD(ntp_optarg);
- +--- 286,292 ----
- + #endif
- +
- + progname = argv[0];
- +! while ((c = ntp_getopt(argc, argv, "c:dilnps")) != -1)
- + switch (c) {
- + case 'c':
- + ADDCMD(ntp_optarg);
- +diff -rc old/usr.sbin/xntp/xntpdc/ntpdc_ops.c new/usr.sbin/xntp/xntpdc/ntpdc_ops.c
- +*** old/usr.sbin/xntp/xntpdc/ntpdc_ops.c Mon Aug 10 17:42:54 1998
- +--- new/usr.sbin/xntp/xntpdc/ntpdc_ops.c Mon Aug 10 17:29:52 1998
- +***************
- +*** 27,32 ****
- +--- 27,33 ----
- + static void peers P((struct parse *, FILE *));
- + static void dmpeers P((struct parse *, FILE *));
- + static void dopeers P((struct parse *, FILE *, int));
- ++ static char *refid_string P((u_int32, int));
- + static void printpeer P((struct info_peer *, FILE *));
- + static void showpeer P((struct parse *, FILE *));
- + static void peerstats P((struct parse *, FILE *));
- +***************
- +*** 71,76 ****
- +--- 72,78 ----
- + static void fudge P((struct parse *, FILE *));
- + static void clkbug P((struct parse *, FILE *));
- + static void kerninfo P((struct parse *, FILE *));
- ++
- +
- + /*
- + * Commands we understand. Ntpdc imports this.
- +Only in new/usr.sbin/xntp/xntpdc: obj.i386
- diff -urN xntp3-5.93d/xntpd/ntp_config.c xntp3-5.93e/xntpd/ntp_config.c
- --- xntp3-5.93d/xntpd/ntp_config.c Tue Mar 3 00:28:54 1998
- +++ xntp3-5.93e/xntpd/ntp_config.c Mon Aug 10 18:16:34 1998
- @@ -484,7 +484,7 @@
- /*
- * Decode argument list
- */
- - while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF)
- + while ((c = ntp_getopt(argc, argv, xntp_options)) != -1)
- switch (c) {
- #ifdef DEBUG
- case 'd':
- @@ -646,7 +646,7 @@
- /*
- * Decode argument list
- */
- - while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF) {
- + while ((c = ntp_getopt(argc, argv, xntp_options)) != -1) {
- switch (c) {
- case 'a':
- proto_config(PROTO_AUTHENTICATE, 1);
- diff -urN xntp3-5.93d/xntpd/ntp_control.c xntp3-5.93e/xntpd/ntp_control.c
- --- xntp3-5.93d/xntpd/ntp_control.c Tue Mar 17 18:02:17 1998
- +++ xntp3-5.93e/xntpd/ntp_control.c Mon Aug 10 18:16:34 1998
- @@ -28,7 +28,8 @@
- struct ctl_proc {
- short control_code; /* defined request code */
- u_short flags; /* flags word */
- - void (*handler)(); /* routine to handle request */
- + void (*handler) /* routine to handle request */
- + P((struct recvbuf *, int));
- };
-
- /*
- diff -urN xntp3-5.93d/xntpd/ntp_proto.c xntp3-5.93e/xntpd/ntp_proto.c
- --- xntp3-5.93d/xntpd/ntp_proto.c Fri Apr 24 21:03:59 1998
- +++ xntp3-5.93e/xntpd/ntp_proto.c Mon Aug 10 18:16:34 1998
- @@ -103,7 +103,9 @@
- extern int debug;
-
- static void clear_all P((void));
- +static int default_get_precision P((void));
-
- +
- /*
- * transmit - Transmit Procedure. See Section 3.4.2 of the
- * specification.
- diff -urN xntp3-5.93d/xntpd/ntpd.c xntp3-5.93e/xntpd/ntpd.c
- --- xntp3-5.93d/xntpd/ntpd.c Sat Apr 25 17:05:57 1998
- +++ xntp3-5.93e/xntpd/ntpd.c Mon Aug 10 18:16:34 1998
- @@ -168,20 +168,20 @@
- #endif /* not DEBUG */
-
- #ifdef NO_MAIN_ALLOWED
- +void xntpdmain P((int, char *[]));
- CALL(xntpd,"xntpd",xntpdmain);
- +#else
- +int main P((int, char *[]));
- #endif
-
- /*
- * Main program. Initialize us, disconnect us from the tty if necessary,
- * and loop waiting for I/O and/or timer expiries.
- */
- -#if !defined(VMS)
- -void
- -#endif /* VMS */
- #ifndef NO_MAIN_ALLOWED
- -main
- +int main
- #else
- -xntpdmain
- +void xntpdmain
- #endif
- (argc, argv)
- int argc;
- diff -urN xntp3-5.93d/xntpd/refclock_arc.c xntp3-5.93e/xntpd/refclock_arc.c
- --- xntp3-5.93d/xntpd/refclock_arc.c Fri Apr 24 19:14:20 1998
- +++ xntp3-5.93e/xntpd/refclock_arc.c Mon Aug 10 18:17:05 1998
- @@ -446,7 +446,6 @@
- #define OPEN_FLAGS (O_RDWR)
- #endif
-
- -
- /*
- * Imported from ntp_timer module
- */
- @@ -511,6 +510,9 @@
-
- static void dummy_event_handler P((struct peer *));
- static void arc_event_handler P((struct peer *));
- +static int space_left P((struct arcunit *));
- +static int send_slow P((struct arcunit *, int, char *));
- +
-
- #define QUALITY_UNKNOWN -1 /* Indicates unknown clock quality. */
- #define MIN_CLOCK_QUALITY 0 /* Min quality clock will return. */
- diff -urN xntp3-5.93d/xntpd/refclock_atom.c xntp3-5.93e/xntpd/refclock_atom.c
- --- xntp3-5.93d/xntpd/refclock_atom.c Tue May 5 03:25:28 1998
- +++ xntp3-5.93e/xntpd/refclock_atom.c Mon Aug 10 18:17:05 1998
- @@ -111,7 +111,9 @@
- /*
- * Imported from ntp_loopfilter module
- */
- +#ifndef PPSX
- extern int fdpps; /* pps file descriptor */
- +#endif /* PPSX */
- extern int pps_update; /* prefer peer valid update */
-
- /*
- @@ -144,6 +146,7 @@
- #ifdef PPS
- static void atom_pps P((struct peer *));
- #endif /* PPS */
- +static int atom_cmpl_fp P((const void *, const void *));
-
- /*
- * Transfer vector
- @@ -262,6 +265,7 @@
-
- pp = peer->procptr;
- up = (struct atomunit *)pp->unitptr;
- +
- #ifdef DEBUG
- if (debug > 2)
- printf("pps_sample: pollcnt %d\n", up->pollcnt);
- @@ -371,8 +375,8 @@
- &pp->lastrec);
- #ifdef DEBUG
- if (debug > 2)
- - printf("atom_receive: pollcnt %d, lastrec %ld\n",
- - up->pollcnt, pp->lastrec);
- + printf("atom_receive: pollcnt %d, lastrec %d\n",
- + up->pollcnt, pp->lastrec.l_ui);
- #endif
-
- /*
- diff -urN xntp3-5.93d/xntpd/refclock_heath.c xntp3-5.93e/xntpd/refclock_heath.c
- --- xntp3-5.93d/xntpd/refclock_heath.c Sun Aug 17 00:16:03 1997
- +++ xntp3-5.93e/xntpd/refclock_heath.c Mon Aug 10 18:17:05 1998
- @@ -133,6 +133,8 @@
- static void heath_shutdown P((int, struct peer *));
- static void heath_receive P((struct recvbuf *));
- static void heath_poll P((int, struct peer *));
- +static int comparetm P((struct tm *, struct tm *));
- +static time_t invert P((struct tm *, struct tm *(*)(const time_t *)));
-
- /*
- * Transfer vector
- @@ -180,14 +182,14 @@
- return 0;
- }
-
- -static long
- +static time_t
- invert(x, func)
- struct tm *x;
- -struct tm *(*func)();
- +struct tm *(*func) P((const time_t *));
- {
- struct tm *y;
- int result;
- - long trial;
- + time_t trial;
- long lower=0L;
- long upper=(long)((unsigned long)(~lower) >> 1);
-
- diff -urN xntp3-5.93d/xntpd/refclock_parse.c xntp3-5.93e/xntpd/refclock_parse.c
- --- xntp3-5.93d/xntpd/refclock_parse.c Sat Sep 27 00:17:45 1997
- +++ xntp3-5.93e/xntpd/refclock_parse.c Mon Aug 10 18:17:06 1998
- @@ -193,19 +193,30 @@
- ** function vector for dynamically binding io handling mechanism
- **/
-
- +struct parseunit;
- typedef struct bind
- {
- char *bd_description; /* name of type of binding */
- - int (*bd_init)(); /* initialize */
- - void (*bd_end)(); /* end */
- - int (*bd_setcs)(); /* set character size */
- - int (*bd_disable)(); /* disable */
- - int (*bd_enable)(); /* enable */
- - int (*bd_getfmt)(); /* get format */
- - int (*bd_setfmt)(); /* setfmt */
- - int (*bd_timecode)(); /* get time code */
- - void (*bd_receive)(); /* receive operation */
- - void (*bd_poll)(); /* poll operation */
- + int (*bd_init) /* initialize */
- + P((struct parseunit *));
- + void (*bd_end) /* end */
- + P((struct parseunit *));
- + int (*bd_setcs) /* set character size */
- + P((struct parseunit *, parsectl_t *));
- + int (*bd_disable) /* disable */
- + P((struct parseunit *));
- + int (*bd_enable) /* enable */
- + P((struct parseunit *));
- + int (*bd_getfmt) /* get format */
- + P((struct parseunit *, parsectl_t *));
- + int (*bd_setfmt) /* setfmt */
- + P((struct parseunit *, parsectl_t *));
- + int (*bd_timecode) /* get time code */
- + P((struct parseunit *, parsectl_t *));
- + void (*bd_receive) /* receive operation */
- + P((struct recvbuf *));
- + void (*bd_poll) /* poll operation */
- + P((struct parseunit *));
- } bind_t;
-
- #define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)
- @@ -397,10 +408,10 @@
- } poll_info_t;
-
- #define NO_CL_FLAGS 0
- -#define NO_POLL (void (*)())0
- -#define NO_INIT (int (*)())0
- -#define NO_END (void (*)())0
- -#define NO_EVENT (void (*)())0
- +#define NO_POLL (void (*) P((struct parseunit *)))0
- +#define NO_INIT (int (*) P((struct parseunit *)))0
- +#define NO_END (void (*) P((struct parseunit *)))0
- +#define NO_EVENT (void (*) P((struct parseunit *, int)))0
- #define NO_DATA (void *)0
- #define NO_FORMAT ""
- #define NO_PPSDELAY 0
- @@ -764,10 +775,14 @@
- static struct parse_clockinfo
- {
- u_long cl_flags; /* operation flags (io modes) */
- - void (*cl_poll)(); /* active poll routine */
- - int (*cl_init)(); /* active poll init routine */
- - void (*cl_event)(); /* special event handling (e.g. reset clock) */
- - void (*cl_end)(); /* active poll end routine */
- + void (*cl_poll) /* active poll routine */
- + P((struct parseunit *));
- + int (*cl_init) /* active poll init routine */
- + P((struct parseunit *));
- + void (*cl_event) /* special event handling (e.g. reset clock) */
- + P((struct parseunit *, int));
- + void (*cl_end) /* active poll end routine */
- + P((struct parseunit *));
- void *cl_data; /* local data area for "poll" mechanism */
- u_fp cl_rootdelay; /* rootdelay */
- u_long cl_basedelay; /* current offset - unsigned l_fp fractional part */
- @@ -1261,6 +1276,15 @@
- static void local_receive P((struct recvbuf *));
- static void local_poll P((struct parseunit *));
-
- +static bind_t *init_iobinding P((struct parseunit *));
- +static char *parsestate P((u_long, char *));
- +static char *parsestatus P((u_long, char *));
- +static char *clockstatus P((u_long));
- +static char *mkascii P((char *, long, char *, long));
- +static void parse_statistics P((struct parseunit *));
- +static void cparse_statistics P((struct peer *));
- +
- +
- static bind_t io_bindings[] =
- {
- #ifdef STREAM
- @@ -4095,7 +4119,15 @@
- u_char *txt; /* pointer to actual data buffer */
- };
-
- -void
- +static void sendcmd P((struct txbuf *, u_char));
- +static void sendbyte P((struct txbuf *, u_char));
- +static void sendetx P((struct txbuf *, struct parseunit *));
- +#if 0
- +static void sendint P((struct txbuf *, int));
- +#endif
- +static void sendflt P((struct txbuf *, double));
- +
- +static void
- sendcmd(buf, c)
- struct txbuf *buf;
- u_char c;
- @@ -4105,7 +4137,8 @@
- buf->idx = 2;
- }
-
- -void sendbyte(buf, b)
- +static void
- +sendbyte(buf, b)
- struct txbuf *buf;
- u_char b;
- {
- @@ -4114,7 +4147,7 @@
- buf->txt[buf->idx++] = b;
- }
-
- -void
- +static void
- sendetx(buf, parse)
- struct txbuf *buf;
- struct parseunit *parse;
- @@ -4133,7 +4166,8 @@
- }
- }
-
- -void
- +#if 0
- +static void
- sendint(buf, a)
- struct txbuf *buf;
- int a;
- @@ -4142,8 +4176,9 @@
- sendbyte(buf, (a>>8) & 0xff);
- sendbyte(buf, a & 0xff);
- }
- +#endif
-
- -void
- +static void
- sendflt(buf, a)
- struct txbuf *buf;
- float a;
- diff -urN xntp3-5.93d/xntpdc/ntpdc.c xntp3-5.93e/xntpdc/ntpdc.c
- --- xntp3-5.93d/xntpdc/ntpdc.c Thu Mar 5 22:08:41 1998
- +++ xntp3-5.93e/xntpdc/ntpdc.c Mon Aug 10 18:17:06 1998
- @@ -239,7 +239,10 @@
- int debug;
-
- #ifdef NO_MAIN_ALLOWED
- +void xntpdcmain P((int, char *[]));
- CALL(xntpdc,"xntpdc",xntpdcmain);
- +#else
- +int main P((int, char *[]));
- #endif
-
- #ifdef SYS_VXWORKS
- @@ -260,13 +263,10 @@
- /*
- * main - parse arguments and handle options
- */
- -#if !defined(VMS)
- -void
- -#endif /* VMS */
- -#ifndef NO_MAIN_ALLOWED
- -main
- +#ifdef NO_MAIN_ALLOWED
- +void xntpdcmain
- #else
- -xntpdcmain
- +int main
- #endif
- (argc, argv)
- int argc;
- @@ -286,7 +286,7 @@
- #endif
-
- progname = argv[0];
- - while ((c = ntp_getopt(argc, argv, "c:dilnps")) != EOF)
- + while ((c = ntp_getopt(argc, argv, "c:dilnps")) != -1)
- switch (c) {
- case 'c':
- ADDCMD(ntp_optarg);
- diff -urN xntp3-5.93d/xntpdc/ntpdc_ops.c xntp3-5.93e/xntpdc/ntpdc_ops.c
- --- xntp3-5.93d/xntpdc/ntpdc_ops.c Sun Mar 15 03:52:15 1998
- +++ xntp3-5.93e/xntpdc/ntpdc_ops.c Mon Aug 10 18:17:06 1998
- @@ -27,6 +27,7 @@
- static void peers P((struct parse *, FILE *));
- static void dmpeers P((struct parse *, FILE *));
- static void dopeers P((struct parse *, FILE *, int));
- +static char *refid_string P((u_int32, int));
- static void printpeer P((struct info_peer *, FILE *));
- static void showpeer P((struct parse *, FILE *));
- static void peerstats P((struct parse *, FILE *));
- @@ -72,6 +73,7 @@
- static void clkbug P((struct parse *, FILE *));
- static void kerninfo P((struct parse *, FILE *));
-
- +
- /*
- * Commands we understand. Ntpdc imports this.
- */
-